Question: Hello, this is Java programming language assignment. I would appreciate it if you could write it in a way that I can copy paste. It's

Hello, this is Java programming language assignment. I would appreciate it if you could write it in a way that I can copy paste. It's a bit of a long assignment so I won't forget to give feedback afterwards. Thank you

Problem 1:Design a class named ProjectOOP. The class must contain following rules.

Class will include projectName: Stringvariable.

projectSubjects: String [ ]

numberOfSubjects: int

Create constructor method. ProjectOOP(String projectName). With this method, reach variables in the class.

Create addProjectSubject(String subject). This method will add new project subjects to the array (projectSubjects [ ]). You will call this method in the main method with string parameter.

Create deleteProjectSubject(String subject).This method will remove the specified project names from the array.

Write getter methods to get Project names and Project subjects. getProjectName( ): Stringand getProjectSubjects( ): String[ ].

Also create getNumProjectSubject( ):int method to return the integer value of total project subjects in the array.

Finally, write a test codeto test your ProjectOOP class and methods.

Hint:

In your test code, create 2 objects with specified project names (ex. project 1 and project 2). Add project subjects to the array by calling addProjectSubject method. Then displaynumber of project subjects in project 1 and project 2, all project subject names in the array and remove 1 subject name from your array. Show all of the steps in your code. Do not forget to add comments in your code file.

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!