Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1: Design a class named ProjectOOP. The class must contain following rules. Class will include projectName: String variable. projectSubjects: String [ ] numberOfSubjects: int

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

Class will include projectName: String variable.

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( ): String and getProjectSubjects( ): String [ ].

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

Finally, write a test code to 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 display number 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.

class name should be main and solve it in one class please thank you.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems Vi Special Issue On Database And Expert Systems Applications Lncs 7600

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2012th Edition

3642341780, 978-3642341786

More Books

Students also viewed these Databases questions

Question

Develop a program for effectively managing diversity. page 303

Answered: 1 week ago

Question

List the common methods used in selecting human resources. page 239

Answered: 1 week ago