Java

Need Help in Java Assignment?
We can help you if you are having difficulty with your Java Assignment. Just email your Java Assignment at admin@assignmentcache.com.
We provide help for students all over the world in Java Assignment.

Items 21 to 30 of 177 total

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

Grid  List 

Set Ascending Direction
  1. PRG421 Week 2 Lab 2.22 LAB Parsing dates

    PRG/421 Week 2 Java Lab 2.22 LAB: Parsing dates

    Regular Price: $6.00

    Special Price: $3.00

    PRG/421 Week 2 Java Lab 2.22 LAB: Parsing dates


    Complete main() to read dates from input, one date per line. Each date's format must be as follows: March 1, 1990. Any date not following that format is incorrect and should be ignored. Use the substring() method to parse the string and extract the date. The input ends with -1 on a line alone. Output each correct date as: 3/1/1990.


    Ex: If the input is:
    March 1, 1990
    April 2 1995
    7/15/20
    December 13, 2003
    -1


    then the output is:
    3/1/1990
    12/13/2003

    Learn More
  2. PRG421 Week 2 Lab 2.16 LAB Playlist (output linked list)

    PRG/421 Week 2 Java 2.16 LAB: Playlist (output linked list)

    Regular Price: $6.00

    Special Price: $3.00

    PRG/421 Week 2 Lab 2.16 LAB: Playlist (output linked list)


    Given main(), complete the SongNode class to include the printSongInfo() method. Then write the Playlist class printPlaylist() method to print all songs in the playlist. DO NOT print the dummy head node.


    Ex: If the input is:
    Stomp!
    380
    The Brothers Johnson
    The Dude
    337
    Quincy Jones
    You Don't Own Me
    151
    Lesley Gore
    -1


    the output is:
    LIST OF SONGS
    -------------
    Title: Stomp!
    Length: 380
    Artist: The Brothers Johnson


    Title: The Dude
    Length: 337
    Artist: Quincy Jones


    Title: You Don't Own Me
    Length: 151
    Artist: Lesley Gore

    Learn More
  3. PRG421 Week 2 Lab 2.15 LAB Inventory (linked lists insert at the front of a list)

    PRG/421 Week 2 Java 2.15 LAB: Inventory (linked lists: insert at the front of a list)

    Regular Price: $6.00

    Special Price: $3.00

    PRG/421 Week 2 Java 2.15 LAB: Inventory (linked lists: insert at the front of a list)


    Given main() in the Inventory class, define an insertAtFront() method in the InventoryNode class that inserts items at the front of a linked list (after the dummy head node).


    Ex. If the input is:
    4
    plates 100
    spoons 200
    cups 150
    forks 200


    the output is:
    200 forks
    150 cups
    200 spoons
    100 plates

    Learn More
  4. PRG421 Week 2 Java 2.14 LAB Mileage tracker for a runner

    PRG/421 Week 2 Java 2.14 LAB: Mileage tracker for a runner

    Regular Price: $6.00

    Special Price: $3.00

    PRG/421 Week 2 Java 2.14 LAB: Mileage tracker for a runner


    Given the MileageTrackerNode class, complete main() In the MileageTrackerLinkedList class to insert nodes into a linked list (using the insertAfter() method). The first user-input value is the number of nodes in the linked list. Use the printNodeData() method to print the entire linked list. DO NOT print the dummy head node.


    Ex. If the input is
    3
    2.2
    7/2/18
    3.2
    7/7/18
    4.5
    7/16/18


    the output is
    2.2, 7/2/18
    3.2, 7/7/18
    4.5, 7/16/18

    Learn More
  5. PRG420 Week 5 Java 5.23 LAB Adjust list by normalizing - methods

    PRG/420 Week 5 Java 5.23 LAB: Adjust list by normalizing - methods

    Regular Price: $7.00

    Special Price: $3.00

    PRG/420 Week 5 Java 5.23 LAB: Adjust list by normalizing - methods


    When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This can be done by normalizing to values between 0 and 1, or throwing away outliers. For this program, adjust the values by subtracting the smallest value from all the values. The input begins with an integer indicating the number of integers that follow. Assume that the list will always contain less than 20 integers.


    Ex: If the input is:
    5 30 50 10 70 65
    the output is:
    20 40 0 60 55
    For coding simplicity, follow every output value by a space, even the last one.


    Your program must define and call a method:
    public static int getMinimumInt(int[] listInts, int listSize)


    Note: This is a lab from a previous chapter that now requires the use of a method.

    Learn More
  6. PRG420 Week 5 Java 5.22 LAB Output values below an amount - methods

    PRG/420 Week 5 Java 5.22 LAB: Output values below an amount - methods

    Regular Price: $7.00

    Special Price: $3.00

    PRG/420 Week 5 Java 5.22 LAB: Output values below an amount - methods


    Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, and output all integers less than or equal to that value. Assume that the list will always contain less than 20 integers.


    Ex: If the input is:
    5 50 60 140 200 75 100
    the output is:
    50 60 75


    The 5 indicates that there are five integers in the list, namely 50, 60, 140, 200, and 75. The 100 indicates that program should output all integers less than or equal to 100, so the program outputs 50, 60, and 75. For coding simplicity, follow every output value by a space, including the last one.
    Such functionality is common on sites like Amazon, where a user can filter results. Write your code to define and use two methods:
    public static void getUserValues(int[] myArr, int arrSize, Scanner scnr)
    public static void outputIntsLessThanOrEqualToThreshold(int[] userValues, int userValsSize, int upperThreshold)


    Utilizing methods will help to make main() very clean and intuitive.
    Note: This is a lab from a previous chapter that now requires the use of methods.

    Learn More
  7. PRG420 Week 5 Java 5.21 LAB Contact list

    PRG/420 Week 5 Java 5.21 LAB: Contact list

    Regular Price: $7.00

    Special Price: $3.00

    PRG/420 Week 5 Java 5.21 LAB: Contact list


    A contact list is a place where you can store a specific contact with other associated information such as a phone number, email address, birthday, etc. Write a program that first takes as input an integer N that represents the number of word pairs in the list to follow. Word pairs consist of a name and a phone number (both strings). That list is followed by a name, and your program should output the phone number associated with that name. Assume that the list will always contain less than 20 word pairs.


    Ex: If the input is:
    3 Joe 123-5432 Linda 983-4123 Frank 867-5309
    Frank
    the output is:
    867-5309


    Your program must define and call the following method. The return value of getPhoneNumber() is the phone number associated with the specific contact name.
    public static String getPhoneNumber(String[] nameVec, String[] phoneNumberVec, String contactName, int arraySize)


    Hint: Use two arrays: One for the string names, and the other for the string phone numbers.

    Learn More
  8. PRG420 Week 5 Java 5.20 LAB Acronyms

    PRG/420 Week 5 Java 5.20 LAB: Acronyms

    Regular Price: $7.00

    Special Price: $3.00

    PRG/420 Week 5 Java 5.20 LAB: Acronyms


    An acronym is a word formed from the initial letters of words in a set phrase. Write a program whose input is a phrase and whose output is an acronym of the input. If a word begins with a lower case letter, don't include that letter in the acronym. Assume there will be at least one upper case letter in the input.


    Ex: If the input is Institute of Electrical and Electronics Engineers, the output should be:
    IEEE


    Your program must define and call a method thats returns the acronym created for the given userPhrase.
    public static String CreateAcronym(String userPhrase)


    Hint: Refer to the ascii table to make sure a letter is upper case.

    Learn More
  9. PRG420 Week 5 Java 5.19 LAB Remove spaces - methods

    PRG/420 Week 5 Java 5.19 LAB: Remove spaces - methods

    Regular Price: $7.00

    Special Price: $3.00

    PRG/420 Week 5 Java 5.19 LAB: Remove spaces - methods


    Write a program that removes all spaces from the given input.
    Ex: If the input is:
    Hello my name is John.
    the output is:
    HellomynameisJohn.


    Your program must define and call the following method. The method should return a string representing the input string without spaces.
    public static String removeSpaces(String userString)


    Note: This is a lab from a previous chapter that now requires the use of a method.

    Learn More
  10. PRG420 Week 5 Java 5.18 LAB Flip a coin

    PRG/420 Week 5 Java 5.18 LAB: Flip a coin

    Regular Price: $7.00

    Special Price: $3.00

    PRG/420 Week 5 Java 5.18 LAB: Flip a coin


    Write a program that simulates flipping a coin to make decisions. The input is how many decisions are needed, and the output is either heads or tails. Assume the input is a value greater than 0.


    Ex: If the input is:
    3
    the output is:
    tails
    heads
    tails


    For reproducibility needed for auto-grading, seed the program with a value of 2. In a real program, you would seed with the current time. In that case, every program's output would be different, which is what is desired but can't be auto-graded.


    Note: A common student mistake is to create an instance of Random before each call to rand.nextInt(). But seeding should only be done once, at the start of the program, after which rand.nextInt() can be called any number of times.


    Your program must define and call the following method that returns "heads' or 'tails".
    public static String headsOrTails(Random rand)

    Learn More

Items 21 to 30 of 177 total

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

Grid  List 

Set Ascending Direction