Question: Create a program that reads in the Courses objects from either the text file you created in Homework 1. (Yes, you can use the code

Create a program that reads in the Courses objects from either the text file you created in Homework 1. (Yes, you can use the code from previous homeworks) or the binary file from Homework 2. Please make sure to include ALL FILES NEEDED TO COMPILE (Course.java, English.java, Math.java, History.java)

Implement your own HashMap implementation. You may use the HashMap example provided in the notes, but you MUST modify it to handle Course bjects only and bring it completely up to coding standards to receive all points. You MAY NOT use java.util.HashMap or java.util.TreeMap in this problem.

After reading in the Course objects, store the Course objects into your HashMap implementation using the unique ID as the key to the map rather than storing them in the ArrayList used in Homework 1. Then print the Course objects from the HashMap in a user friendly fashion. You may use iterator or for-each loop-> DO NOT JUST System.out.println THE HASHMAP- ITERATE THROUGH IT. Hint: Modify your toString to get a nice looking output.

Homework 1 Screenshots below as source code is too long

Create a program that reads in the Courses objects from either thetext file you created in Homework 1. (Yes, you can use thecode from previous homeworks) or the binary file from Homework 2. Pleasemake sure to include ALL FILES NEEDED TO COMPILE (Course.java, English.java, Math.java,History.java) Implement your own HashMap implementation. You may use the HashMap exampleprovided in the notes, but you MUST modify it to handle Coursebjects only and bring it completely up to coding standards to receiveall points. You MAY NOT use java.util.HashMap or java.util.TreeMap in this problem.After reading in the Course objects, store the Course objects into yourHashMap implementation using the unique ID as the key to the maprather than storing them in the ArrayList used in Homework 1. Thenprint the Course objects from the HashMap in a user friendly fashion.

import public classCourse implements Serializable private String category; private String name; private int srR: Constructor with all parameters set. Oparam category param name @param GrR public Course(String category, String name, int sTA) super) this*sateeorx - category; this.namename; Method that determines what prints when object is printed. (non-Javadoc) see @Override public String toStcing() return category +", "name+ Getter method for category return the category public String setcategecx) return category; Setter method for category Oparam category the category to set public void setCategecx(String category) this sateggrx category; Getter method for name return the name public String getName) return name; *Setter method for name param name the name to set public void setName(String name) this.namename; Getter method for ccp Oreturn the soR public int setccac) return SR: Setter method for ccp @param GrR the scR to set public void setSrn(int Ca import import public class Coursekist // actual Coucseist data private Aaist new Acraytist new Acraytist

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!