PRG421 Java Programming II

Need Help in PRG/421 Java Assignments?
We can help you if you are having difficulty with your PRG421 Assignment. Just email your assignments at support@assignmentcache.com.
We provide help for students all over the world.

Items 11 to 20 of 25 total

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

Grid  List 

Set Ascending Direction
  1. PRG421 Week 4 Java 4.15 LAB Ticketing service (Queue)

    PRG/421 Week 4 Java 4.15 LAB: Ticketing service (Queue)

    Regular Price: $7.00

    Special Price: $3.00

    PRG/421 Week 4 Java 4.15 LAB: Ticketing service (Queue)


    Given main, complete the program to add people to a queue. The program should read in a list of people's names including "You" (ending with -1), adding each person to the peopleInQueue queue. Then, remove each person from the queue until "You" is at the head of the queue. Include print statements as shown in the example below.


    Ex. If the input is
    Zadie Smith
    Tom Sawyer
    You
    Louisa Alcott
    -1


    the output is
    Welcome to the ticketing service...
    You are number 3 in the queue.
    Zadie Smith has purchased a ticket.
    You are now number 2
    Tom Sawyer has purchased a ticket.
    You are now number 1
    You can now purchase your ticket!

    Learn More
  2. PRG421 Week 4 Java 4.14 LAB Student grades (HashMap)

    PRG/421 Week 4 Java 4.14 LAB: Student grades (HashMap)

    Regular Price: $7.00

    Special Price: $3.00

    PRG/421 Week 4 Java 4.14 LAB: Student grades (HashMap)


    Given a HashMap pre-filled with student names as keys and grades as values, complete main() by reading in the name of a student, outputting their original grade, and then reading in and outputting their new grade.


    Ex: If the input is
    Quincy Wraight
    73.1


    the output is
    Quincy Wraight's original grade: 65.4
    Quincy Wraight's new grade: 73.1

    Learn More
  3. PRG421 Week 4 Java 4.13 LAB Grocery shopping list (LinkedList)

    PRG/421 Week 4 Java 4.13 LAB: Grocery shopping list (LinkedList)

    Regular Price: $7.00

    Special Price: $3.00

    PRG/421 Week 4 Java 4.13 LAB: Grocery shopping list (LinkedList)


    Given a ListItem class, complete the main() using the built-in LinkedList type to create a linked list called shoppingList. The program should read items from input (ending with -1), adding each item to shoppingList, and output each item in shoppingList using the printNodeData() method.


    Ex. If the input is
    milk
    bread
    eggs
    waffles
    cereal
    -1


    the output is
    milk
    bread
    eggs
    waffles
    cereal

    Learn More
  4. PRG421 Week 4 Java 4.6 LAB Zip code and population (generic types)

    PRG/421 Week 4 Java 4.6 LAB: Zip code and population (generic types)

    Regular Price: $7.00

    Special Price: $3.00

    PRG/421 Week 4 Java 4.6 LAB: Zip code and population (generic types)


    Define a class StatePair with two generic types (Type1 and type2), a constructor mutators, accessors, and a printinfo() method. Three ArrayLists have been pre-filled with StatePair data in main():
    • ArrayList<StatePairInteger, String>> zipCodeState: Contains ZIP code/state abbreviation pairs
    • ArrayList<StatePair<string, String>> abbrevstate: Contains state abbreviation/state name pairs
    • ArrayList<StatePair<string. Integer>> state Population Contains state name/population pairs


    Complete main() to use an input ZIP code to retrieve the correct state abbreviation from the ArrayList ZipCodeState. Then use the state abbreviation to retrieve the state name from the ArrayList abbrevState. Lastly, use the state name to retrieve the correct state name/population pair from the ArrayList state Population and output the pair.


    Ex If the input is:
    21044


    the output is:
    Maryland: 6079602

    Learn More
  5. PRG421 Week 4 Java 4.5 LAB What order (generic methods)

    PRG/421 Week 4 Java 4.5 LAB: What order? (generic methods)

    Regular Price: $7.00

    Special Price: $3.00

    PRG/421 Week 4 Java 4.5 LAB: What order? (generic methods)


    Define a generic method called checkOrder() that checks if four items are in ascending, neither, or descending order. The method should return -1 if the items are in ascending order, 0 if the items are unordered, and 1 if the items are in descending order.
    The program reads four items from input and outputs if the items are ordered. The items can be different types, including integers, Strings characters, or doubles


    Ex. If the input is
    bat hat mat sat
    63.2 96.5 100.1 123.5


    the output is
    Order: -1
    Order: -1

    Learn More
  6. PRG421 Week 3 Java 3.21 LAB Plant information (ArrayList)

    PRG/421 Week 3 Java 3.21 LAB: Plant information (ArrayList)

    Regular Price: $6.00

    Special Price: $3.00

    PRG/421 Week 3 Java 3.21 LAB: Plant information (ArrayList)


    Given a base Plant class and a derived Flower class, complete main() to create an ArrayList called myGarden. The ArrayList should be able to store objects that belong to the Plant class or the Flower class. Create a method called printArrayList(), that uses the printInfo() methods defined in the respective classes and prints each element in myGarden. The program should read plants or flowers from input (ending with -1), adding each Plant or Flower to the myGarden ArrayList, and output each element in myGarden using the printInfo() method.


    Ex. If the input is:
    plant Spirea 10
    flower Hydrangea 30 false lilac
    flower Rose 6 false white
    plant Mint 4
    -1


    the output is:
    Plant Information:
    Plant name: Spirea
    Cost: 10

    Plant Information:
    Plant name: Hydrengea
    Cost: 30
    Annual: false
    Color of flowers: lilac

    Plant Information:
    Plant name: Rose
    Cost: 6
    Annual: false
    Color of flowers: white

    Plant Information:
    Plant name: Mint
    Cost: 4

    Learn More
  7. PRG421 Week 3 Lab 3.20 LAB Book information (overriding member methods)

    PRG/421 Week 3 Java 3.20 LAB: Book information (overriding member methods)

    Regular Price: $6.00

    Special Price: $3.00

    PRG/421 Week 3 Java 3.20 LAB: Book information (overriding member methods)


    Given main() and a base Book class, define a derived class called Encyclopedia. Within the derived Encyclopedia class, define a printInfo() method that overrides the Book class' printInfo() method by printing not only the title, author, publisher, and publication date, but also the edition and number of volumes.


    Ex. If the input is:
    The Hobbit
    J. R. R. Tolkien
    George Allen & Unwin
    21 September 1937
    The Illustrated Encyclopedia of the Universe
    James W. Guthrie
    Watson-Guptill
    2001
    2nd
    1


    the output is:
    Book Information:
    Book Title: The Hobbit
    Author: J. R. R. Tolkien
    Publisher: George Allen & Unwin
    Publication Date: 21 September 1937
    Book Information:
    Book Title: The Illustrated Encyclopedia of the Universe
    Author: James W. Guthrie
    Publisher: Watson-Guptill
    Publication Date: 2001
    Edition: 2nd
    Number of Volumes: 1


    Note: Indentations use 3 spaces.

    Learn More
  8. PRG421 Week 3 Lab 3.19 LAB Course information (derived classes)

    PRG/421 Week 3 Java 3.19 LAB: Course information (derived classes)

    Regular Price: $6.00

    Special Price: $3.00

    PRG/421 Week 3 Lab 3.19 LAB: Course information (derived classes)


    Given main(), define a Course base class with methods to set and get the courseNumber and courseTitle. Also define a derived class OfferedCourse with methods to set and get instructorName, term, and classTime.


    Ex. If the input is:
    ECE287
    Digital Systems Design
    ECE387
    Embedded Systems Design
    Mark Patterson
    Fall 2018
    WF: 2-3:30 pm


    the output is:
    Course Information:
    Course Number: ECE287
    Course Title: Digital Systems Design
    Course Information:
    Course Number: ECE387
    Course Title: Embedded Systems Design
    Instructor Name: Mark Patterson
    Term: Fall 2018
    Class Time: WF: 2-3:30 pm

    Learn More
  9. PRG421 Week 3 Lab 3.18 LAB Instrument information (derived classes)

    PRG/421 Week 3 Java 3.18 LAB: Instrument information (derived classes)

    Regular Price: $6.00

    Special Price: $3.00

    PRG/421 Week 3 Lab 3.18 LAB: Instrument information (derived classes)


    Given main() and the Instrument class, define a derived class, String Instrument, for string instruments.
    Ex. If the input is:
    Drums
    Zildjian
    2015
    2500
    Guitar
    Gibson
    2002
    1200
    6
    19


    the output is:
    Instrument Information:
    Name: Drums
    Manufacturer: Zildjian
    Year built: 2015
    Cost: 2500
    Instrument Information:
    Name: Guitar
    Manufacturer: Gibson
    Year built: 2002
    Cost: 1200
    Number of strings: 6
    Number of frets: 19

    Learn More
  10. PRG421 Week 3 Lab 3.17 LAB Pet information (derived classes)

    PRG/421 Week 3 Java 3.17 LAB: Pet information (derived classes)

    Regular Price: $6.00

    Special Price: $3.00

    PRG/421 Week 3 Lab 3.17 LAB: Pet information (derived classes)


    The base class Pet has private fields petName, and petAge. The derived class Dog extends the Pet class and includes a private field for dogBreed. Complete main() to:
    - create a generic pet and print information using printInfo().
    - create a Dog pet, use printInfo() to print information, and add a statement to print the dog's breed using the getBreed() method.


    Ex. If the input is:
    Dobby
    2
    Kreacher
    3
    German Schnauzer


    The output is:
    Pet Information:
    Name: Dobby
    Age: 2
    Pet Information:
    Name: Kreacher
    Age: 3
    Breed: German Schnauzer

    Learn More

Items 11 to 20 of 25 total

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

Grid  List 

Set Ascending Direction