Question: I NEED THIS IN JAVA ASAP! Write a class DegreeWorks. It will be used to tell you which courses you need to complete in order

I NEED THIS IN JAVA ASAP!

Write a class DegreeWorks. It will be used to tell you which courses you need to complete in order to graduate. It must have:

A private ArrayList (Java) or List (C#) of strings called required

A private ArrayList (Java) or List (C#) of strings called completed.

A private method called cs() which adds "CSE1321", "CSE1321L", "CSE1322","CSE1322L" and "CS3305" to the required ArrayList/List.

A private method called it() which adds "CSE1321", "CSE1321L", and "IT1114" to the required ArrayList/List.

An overloaded constructor that takes in a major (string) and an ArrayList/List of courses you have passed.

If the passed in major is CS called the cs() method. If it's IT, call the it() method.

Set the completed ArrayList/List to the values passed in to this constructor.

A method leftToTake() which takes in no parameters and returns void.

It will print out any courses the student has not completed, but is required to take.

In your driver class:

Create a method called classesTaken which takes in no parameters and returns an ArrayList/List of strings.

Create a new ArrayList/List of strings.

Add to the arraylist CSE1321 and CSE1321L.

Return the collection.

In your main method

Call classesTaken, store the resulting ArrayList/List in a variable.

Instantiate a DegreeWorks object for a CS student with the classes taken from the above method.

Call leftToTake, so it prints out the missing classes.

Sample Output:

Must take:CSE1322

Must take:CSE1322L

Must take:CS3305

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!