Welcome to AssignmentCache!

Search results for 'ITS 320'

Items 1 to 10 of 51 total

per page
Page:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5

Grid  List 

Set Descending Direction
  1. PRG 420 Week 3 Simple Commission Calculation Program Part 2

    PRG 420 Week 3 Simple Commission Calculation Program Part 2

    $15.00

    PRG 420 Week 3 Simple Commission Calculation Program Part 2

    Modify the Week Two Java™ application using Java™ NetBeans™ IDE to meet these additional and changed business requirements. Either a GUI (graphic user interface) program or non-GUI program is acceptable.
    • The company has recently changed its total annual compensation policy to improve sales.
    • A salesperson will continue to earn a fixed salary of $25,000.00. The current sales target for every salesperson is $120,000.
    • The sales incentive will only start when 80% of the sales target is met. The current commission is 10% of total sales.
    • If a salesperson exceeds the sales target, the commission will increase based on an acceleration factor. The acceleration factor is 1.25 which means all sales above the sales target will be earning 25% commission.
    • The application should ask the user to enter annual sales, and it should display the total annual compensation.
    • The application should also display a table of potential total annual compensation that the salesperson could have earned, in $5000 increments above the salesperson’s annual sales, until it reaches 50% above the salesperson’s annual sales.

    Sample Table: Assuming a total annual sales of $100,000, the table would look like this:
    Total Sales    Total Compensation
    100,000    <<Program calculated value>>
    105,000    <<Program calculated value>>
    110,000    <<Program calculated value>>
    115,000    <<Program calculated value>>
    120,000    <<Program calculated value>>
    125,000    <<Program calculated value>>
    130,000    <<Program calculated value>>
    135,000    <<Program calculated value>>
    140,000    <<Program calculated value>>
    145,000    <<Program calculated value>>
    150,000    <<Program calculated value>>

    The Java™ application should also meet these technical requirements:
     Create a NetBeans project and name it XXXIA3. XXX is your last name. It is important to use your last name so that each student’s project name is unique. When your team evaluation the members’ program, the team will know whom the program belong to.  Your system can also load in multiple projects without conflicting project names. The number 3 in the file name is the academic week number.
    • The application should have at least one class, in addition to the application’s controlling class.
    • The source code must demonstrate the use of conditional and looping structures.
    • There should be proper documentation in the source code.

    Because NetBeans produces multiple files for one project, the best method to submit an assignment is to zip the files. There should be one project folder created by NetBeans using your project name. Zip the folder. Submit your NetBeans project zip file.

    Learn More
  2. CIS355A Week 2 Step 3 Diamond  Java Programs

    CIS355A iLab 2 Largest Palindrome and Diamond Programs

    $15.00

    CIS355A iLab 2 Largest Palindrome and Diamond Programs

    In this lab you will create programs that use control structures and user-defined methods.

    Deliverables
    Program files for each of the following three programs.
    1. Largest
    2. Palindrome
    3. Diamond
    At the beginning of ALL your programs, put a comment box that includes the program name, your name, and a brief description of the program.

    iLAB STEPS
    STEP 1: Largest (10 points)
    Write a Java application program called Largest.java that inputs a series of 10 single-digit numbers and determines and prints the largest of the numbers. Except main() method, no other user-defined method is required. Your program should use at least the following three variables
    1. counter: A counter to count to 10 (that is, to keep track of how many numbers have been input and to determine when all 10 numbers have been processed);
    2. number: The current digit input to the program; and
    3. largest: The largest number found so far.
    When each number is entered, make sure it is a single digit number, that is 0 to 9.

    STEP 2: Palindrome (15 points)
    A palindrome is a sequence of characters that reads the same backward as forward. For example, each of the following five-digit integers is a palindrome: 12321, 55555, 45554, and 11611. Write an application called Palindrome.java that asks the user to enter in a five-digit integer and determines whether it is a palindrome. If the number is not five digits long, display an error message dialog indicating the problem to the user. When the user dismisses the error dialog, allow the user to enter a new value.
    Your program will have the following four methods
    1. main() method, which controls the execution of the program;
    2. retrieveInput() method, which prompts and retrieves the input values;
    3. check() method, which determines whether it is a palindrome; and
    4. display() method, which displays the result.

    STEP 3: Diamond (15 points)
    Write a program called Diamond.java that uses a method diamondOfAsterisks() that displays a diamond (the row number of a diamond must be odd) of asterisks whose row is specified in an integer parameter row. For example, if the user enters a 7, then the diamond will have seven rows and the method will display the pattern of asterisks. Below is an example of the diamond displayed when 7 is entered.
       *
      ***
     *****
    *******
     *****
      ***
       *

    Learn More
  3. CIS355A iLab 3 Step 1 Cylinder Java Programs

    CIS355A iLab 3 Cylinder and Date Java Programs

    $15.00

    CIS355A iLab 3 Cylinder and Date Java Programs

    In This lab you will create two programs that use classes and methods.

    Deliverables
    Program files for each of the following two programs
    1. Cylinder
    2. Date

    iLAB STEPS
    STEP 1: Cylinder
    Create a class called Cylinder.java that contains two double-precision instance variables named radius and height. The class should include a constructor that initializes the radius and height variables. Also, you need a class method named volume() that returns the volume of a Cylinder object. The volume of a cylinder is given by its radius squared times its height times Pi (radius * radius * height * Math.PI). You can either use the value 3.1416 for Pi or use the Java provided value named Math.PI.
    Write a class called CylinderTest.java and declare an array of three Cylinder objects to call the methods you declared in the Cylinder class. Make sure that all class methods are called from main(). Have main() display the value returned by volume() and verify the returned value by hand calculations (paper/pencil). Prompt the user to enter the values for the radius and height of each Cylinder object in the array.


    STEP 2: Date (20 points)
    Create a program called Date.java to perform error-checking on the initial values, for instance: fields month, day, and year. Also, provide a method nextDay() to increment the day by one. The Date object should always remain in a consistent state.
    Write a program called DateTest.java that prompts the user to enter the month, day, and year as numeric values. This program then creates a Date object using the Date class you just created and tests the nextDay() method. This can be done in a loop of 40 iterations: the Date object calls the nextDay() method and prints the date during each iteration of the loop. This loop is to illustrate that the nextDay() method works correctly. Test the following cases:
    a. Incrementing into the next month, for example, use date: 02/28/2011
    b. Incrementing into the next year, for example, use date: 11/27/2011
    c. Incrementing into the next month in a leap year, for example, use date: 02/28/2012
    Sample Program Output:
    Checking increment
    Date object constructor for date 11/27/2011
    Incremented Date:11/28/2011
    Incremented Date:11/29/2011
    Incremented Date:11/30/2011
    Day 31 invalid. Set to day 1.
    Incremented Date:12/1/2011
    Incremented Date:12/2/2011
    ...
    Incremented Date:12/30/2011
    Incremented Date:12/31/2011
    Day 32 invalid. Set to day 1.
    Incremented Date:1/1/2012
    Incremented Date:1/2/2012
    Incremented Date:1/3/2012
    Incremented Date:1/4/2012
    Incremented Date:1/5/2012
    Incremented Date:1/6/2012

    Learn More
  4. LastWord Java Program

    LastWord Java Program

    $5.00

    LastWord Java Program

    1 LastWord.java
    You will write a Java program with the file name LastWord.java. The purpose of this program is to scan through a file and find in the file:
    1. The word that is closest to the beginning of the dictionary
    2. The word that is closest to the end of the dictionary
    3. The longest word
    For the purpose of this program, a word is defined as a string of characters delimited by whitespace that starts with a letter and ends with a letter. If a string of character delimited by whitespace that starts with one or more non-letters, they should be trimmed until the first character is a letter. Same should be done to the trailing non-letters. For example, the string of character “quote” should be trimmed to quote, --dash-- should be trimmed to dash. The non-letter enclosed by letters should be left alone. This definition of a word may make your English teachers cringe, but will be much easier to implement.
    The lexicographical order of the words can be determined simply by using the compareToIgnoreCase() method of String class.
    The input file name should be entered by a JOptionPane input dialog box.
    2 Suggested Procedure
    1. Start the program by popping up an input dialog box to ask user for a file name.
    2. Instantiate a FileReader using the file name wrapped in a BufferedReader.
    3. nstantiate a FileWriter wrapped in a BufferedWriter.  The output file name may be hardcoded.
    4. Test the program by reading the input file and write the input to the output file. Compare the input file and output file.
    5. Instantiate a Scanner that scans the BufferedReader. By default the Scanner delimits the tokens by whitespaces. Write the scanned tokens, one per line, to the output file. Exam the output file.
    6. Write a new public class named WordSmith.  Create a static method trim() to remove the non-letters around the words. Test WordSmith.trim() until you are satisfied.
    7. Back to LastWord, between Scanner output and write to output, insert a call to WordSmith.trim(). Create a test file with all the possible scenarios you can think of.  It will be more effective if you write out the word before and after trim() is called side-by-side on the same line.
    8. Consider sharing your test file at DocSharing.
    9. Add the code to LastWord to find the first word, last word, and the longest word.
    10. Use JOptionPane.showMessageDialog() to display the results. Show the file name used in the title of the dialog box.

    Deliverables
    Source file(s): LastWord.java and WordSmith.java

    Learn More
  5. Greatest Common Divisor GCD using euclidean algorithm Java Program

    Greatest Common Divisor GCD using euclidean algorithm Java Program

    $5.00

    Greatest Common Divisor GCD using euclidean algorithm Java Program

    This program will calculate the greatest common divisor of two positive integers using euclidean algorithm. in its simplest form, Euclid's algorithm starts with at pair of positive integers and forms a new pair that consists of the smaller number and the difference between the larger and smaller umbers. the process repeats until the numbers are equal. That number then is the greatest common divisor of the original pair. for example,to calculate the GCD of 49 and 35 the GCD of 49 and 35 is 7. Program input and output should use JOption. the validity of the inputs shall be checked and user error messages are displayed.

    Learn More
  6. Find and print out all the palindromes in a file Java Program

    Find and print out all the palindromes in a file Java Program

    $20.00

    Find and print out all the palindromes in a file Java Program

    Find and print out all the palindromes in a file, ignoring any strings with numbers in them, and printing them out in alphabetical order. Your program should:
    1. Open the file, dealing with possible exceptions
    If there is no file name given, print "insufficient arguments given"
    If there is no file, print "file not found"

    2. Read the file word by word, where words are any strings of characters separated by whitespace. For example "ghoud3421" is a word, but as it contains digits you would not test to see if it is a palindrome.

    3. For each word, use a separate method to see if it contains digits, and if it does not, check using another method whether it is a palindrome.

    4. Collect all the palindromes, including duplicates.

    5. Print out all the palindromes in alphabetical order.

    A palindrome is a word whose meaning may be interpreted the same way in either forward or reverse direction. e.g. dad, tattarrattat, abccba, abbba, aba.
    Learning Outcomes

    File I/O
    String manipulation
    Using the Java Collections

    Sample Input/Output
    Case A
    Input: java PalindromeCounter
    Output: insufficient arguments given

    Case B
    Input: java PalindromeCounter nofile
    Output: file not found

    Case C
    Input: java PalindromeCounter file1.txt
    file1.txt:
    abcd a1a aa1 a
    ccc
    a !#! z#z %1%
    haah Zaz

    Output:
    !#!
    a
    a
    ccc
    haah
    z#z

    Skeleton Code
    textpop-up
    public classPalindromeCounter {
    public static void main(String[] args) {
    // TODO fill in this method
    }
    protected static boolean isValidWord(Stringword) {
    // TODO fill in this method
    }
    protected static boolean isPalindrome(Stringword) {
    // TODO fill in this method
    }
    }

    Learn More
  7. COP3804 Assignment 4 Infix to Postfix

    COP3804 Assignment 4 Infix to Postfix

    $15.00

    COP3804 Assignment 4 Infix to Postfix

    The concept of stack is extremely important in computer science and is used in a wide variety of problems. This assignment requires you to write a program that can be used to evaluate ordinary arithmetic expressions that contains any of the five arithmetic operators (+, -, *, /, %).

    This exercise requires three distinct steps, namely:
    1. Verify that the infix arithmetic expression (the original expression), that may contain regular parentheses, is properly formed as far as parentheses are concerned.
    2. If the parenthesized expression is properly formed, convert the expression from an infix expression to its equivalent postfix expression, called Reverse Polish Notation (RPN) named after the Polish Mathematician J. Lukasiewics.
    3. Evaluate the postfix expression, and print the result.

    Step 1 - Verify that the expression
    Given an arithmetic expression, called an infixed expression, to verify that it is properly formed as far as parentheses are concerned, do the following:
    • Create an empty stack to hold left parenthesis ONLY.
    • Scanned the arithmetic expression from left to right, one character at a time.
    • While there are more characters in the arithmetic expression
    {
    If the character is a left parenthesis ‘(‘, push it on to the stack. However if the character is a right parenthesis, ‘)’, visit the stack and pop the top element from off the stack.
    }
    • If the stack contains any element at the end of reading the arithmetic expression, then the expression was not properly formed.

    Step 2 - Convert infixed expression to postfix
    Given that an arithmetic expression is properly form with respect to parentheses, do the following:
    • Create an empty stack to hold any arithmetic operators and left parenthesis, ONLY.
    • A string to contain the postfix expression – the output from this conversion.
    • Scan the arithmetic expression from left to right.
    • While the are more symbols in the arithmetic expression,
    {
    After a symbol is scanned, there are four (4) basic rules to observed and apply accordingly:
    1. If the symbol is an operand (a number), write it to the output string.
    2. If the symbol is an operator and if the stack is empty, push the symbol on the stack.
    Otherwise, if the symbol is either ‘(‘ or ‘)’, check for the following conditions:
    If the symbol is ‘(‘, push on to the stack,
    Otherwise
    If the symbol is ‘)’
    {
    Pop everything from the operator stack down to the first ‘(‘. Write each item
    popped from the stack to the output string. Do not write the item ‘)’. Discard it.
    }
    3. If the symbol scanned is an arithmetic operator, check for the following and apply accordingly:
    If the operator on the top of the stack has higher or equal precedence, that operator is popped from off the stack, and is written to the to the output string. This process is continues until one of two things happen:
    (a) Either the first ‘(‘ is encountered. When this occurs, the ‘(‘ is removed from the stack and is discarded, and the recently scanned symbol is placed on the stack
    OR
    (b) The operator on the stack has lower precedence than the one just scanned. When this situation arises, the recently scanned symbol is pushed onto the stack.
    }
    4. After the arithmetic expression is exhausted, any operator is remaining on the stack must be popped from off and is written to the output string.

    Step 3 - Evaluate the post fixed expression
    Initialize an empty stack.
    While there are more symbols in the postfix string
    {
    ? If the token is an operand, push it onto the stack.
    ? If the token is an operator
    {
    Pop the two topmost values from the stack, and store them in the order t1, the topmost, and t2 the second value.
    Calculate the partial result in the following order t2 operator t1
    Push the result of this calculation onto the stack.
    NOTE: If the stack does not have two operands, a malformed postfix expression has occurred, and evaluation should be terminated.
    }
    }
    When the end of the input string is encountered, the result of the expression is popped from the stack.
    NOTE: If the stack is empty or if it has more than one operand remaining, the result is unreliable.

    Extend this algorithm to include square brackets and curly braces. For example, expressions of the following kind should be considered
    2 + { 2 * ( 10 – 4 ) / [ { 4 * 2 / ( 3 + 4) } + 2 ] – 9 }
    2 + } 2 * ( 10 – 4 ) / [ { 4 * 2 / ( 3 + 4) } + 2 ] – 9 {

    Implement the above two algorithms for the following binary operators: addition +, subtraction -, multiplication *, division /, and modulus operation %. All operations are integer operations. To keep things simple, place at least one blank space between each token in the input string.

    Use the following code below as your Main Test class:
    class RPN
    {
    public static void main(String[] arg)
    {
    String s[] = {"5 + ) * ( 2",
    " ( { [ } ) ] ",
    " 2 + ] - 3 * 5 [ ",
    "[( 2 + 3 ) * 5] * 8 ",
    "5 * 10 + ( 15 - 20 ) ) - 25",
    "5 * { 10 + ( 15 - 20 ) } - 25",
    " 5 + [ 5 * { 10 + ( 15 - 20 ) } - 25 ] * 9"
    };
    for (int i = 0; i < s.length; i++)
    {

    Arithmetic a = new Arithmetic(s[i]);
    if (a.isBalance())
    {
    System.out.println("Expression " + s[i] + " is balanced\n");
    a.postfixExpression();
    System.out.println("The post fixed expression is " + a.getPostfix());
    a.evaluateRPN();
    System.out.println("The result is : " + a.getResult() + "\n" );
    }
    else
    System.out.println("Expression is not balanced\n");
    }
    }
    }

    Learn More
  8. ITS 320 Program 3 Exercise 5.17 Java

    ITS 320 Assignment 3 Decision Control and Loops with User Interaction

    $15.00

    ITS 320 Assignment 3 Decision Control and Loops with User Interaction

    1) Write a Java application that prompts the user for pairs of inputs of a product number (1-5), and then an integer quantity of units sold (this is two separate prompts for input values). You must use a switch statement and a sentinel – controlled loop (i.e. a loop that stops execution when an out of range value, such as -1, is input). All 15 items below are for a single purchase. There are five sets of inputs as follows:
    Product 1 1 unit (cost is $2.98 per unit)
    Product 2 2 units (cost is $4.50 per unit)
    Product 3 3 units (cost is $9.98 per unit
    Product 4 4 units (cost is $4.49 per unit)
    Product 5 5 units (cost is $6.87 per unit)
    Your application must calculate and display the total retail value of all products sold, after all 5 pairs of inputs are completed. You must also display the total after each new pair of input values is entered. (This program was taken from Exercise 5.17 on page 228 of Deitel & Deitel's "Java How to Program (Sixth Edition)" (2005 by Pearson Publishing Co.))

    2) You may use the Windows Command Prompt command line interface or any Java IDE you choose to compile and execute your program.

    3) You are to submit the following deliverables to the Assignment Dropbox in a single Microsoft Word file:
    A screen snapshot of your Java source code (just the beginning is OK) as it appears in your IDE (e.g. jGRASP, Net Beans, Eclipse, etc.) or editor (e.g. a Windows Command Prompt DOS "more" of the .java file's first screen).
    A listing of your entire Java source code in the same Microsoft Word file as item a), and following item a). You can simply copy and paste the text from your IDE into Word. Be sure to maintain proper code alignment by using Courier font for this item.
    A screen snapshot of your program’s input and output in the same Microsoft Word file, and following item b). You must include screen snapshots of all inputs and all outputs,not just a sample.

    4) Your instructor may compile and run your program to verify that it compiles and executes properly.

    5) You will be evaluated on (in order of importance):
    Inclusion of all deliverables in Step #3.
    Correct execution of your program.
    Adequate commenting of your code.
    Good programming style (as specified in the textbook's examples).
    Neatness in packaging and labeling of your deliverables

    Learn More
  9. ITS 320 Assignment 4 Line Separator Java Program

    ITS 320 Assignment 4 Separate lines Java Program

    $15.00

    ITS 320 Assignment 4 Separate lines Java Program

    1. Write a program to assign the integer values 1 through 25 to a 25 element integer array. Then, print the array as five separate lines each containing five elements separated by commas. The last element on each line should be followed by a newline instead of a comma. The output of your program should appear exactly as follows:
    1,2,3,4,5
    6,7,8,9,10
    11,12,13,14,15
    16,17,18,19,20
    21,22,23,24,25

    Hints:
    One way to determine every 5th element is to use the modules operator (%). If you divide the subscript by 5 and the remainder is 0, it is the 5th number.
    You can use System.out.print() to print a value without a newline following it. This will allow you to print multiple things on the same line.
    You may use the Windows Command Prompt command line interface or any Java IDE you choose to compile and execute your program.

    Learn More
  10. ITS 320 Assignment 5 Phone subclass Java Program

    ITS 320 Assignment 5 Inheritance and Polymorphism Java Program

    $15.00

    ITS 320 Assignment 5 Inheritance and Polymorphism Java Program

    Key in the PolyMain, Book, Almanac, and Novel classes defined in this module of the course. Once you get each of these classes keyed in, make sure they compile and execute properly. Then create a third subclass called Phone that also extends the Book class. The Phone class should keep track of the number of yellow pages and the number of white pages in each phone book. Make sure the Phone subclass you create has a print method having the same signature as the print method in the Book class. The print method from the Phone class should print the title of the book, followed by the number of yellow pages and white pages contained within the phone book. Thus, the print method should have the following signature:
    public void print();

    The Phone class should also have a constructor having the following signature:

    public Phone(String title, int whitePages, int yellowPages);

    This constructor should sum up whitePages + yellowPages to get the total number of pages in the book. Remember the total pages in the book and the title of the book are set in the constructor for the Book class.

    Modify the PolyMain class to create at least one of your phone books and store it in the library. You should now be able to print the library without having to modify the print method defined within the PolyMain class.

    Learn More

Items 1 to 10 of 51 total

per page
Page:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5

Grid  List 

Set Descending Direction
[profiler]
Memory usage: real: 14680064, emalloc: 14320208
Code ProfilerTimeCntEmallocRealMem