Question: JAVA. Need Help developing this program, with commentary if possible. HW 6 Classes and objects You will write a Java class to represent a class

JAVA. Need Help developing this program, with commentary if possible.

JAVA. Need Help developing this program, with commentary if possible. HW 6

Classes and objects You will write a Java class to represent a

HW 6 Classes and objects You will write a Java class to represent a class section like our very own CIS 131. This class has a number of data members (aka instance variables, aka properties aka attributes) which we all know so well from looking at class schedules on the Pima web site: 1. CRN, like 20008 2. Department code, like CIS 3. Course number, like 131 4. Instructional mode, like online, on-ground or hybrid 5. Meeting days (on-ground and hybrid only, otherwise "N/A") 6. Meeting times (on-ground and hybrid only, otherwise "N/A") 7. Capacity (maximum number of students who can enroll in it) 8. Enrollment (number of students actually enrolled in it) 9. Instructor's ID number (in schedules you see the instructor's name due to a database operation called a join. Take CIS162 and 182 for more info on this.) The class representing a class section will have all of the attributes listed above along with getter and setter methods for each of them. It will also have a default constructor that takes no parameters. This constructor will assign *** (empty string) to String attributes, 0 to int attributes and 0.0 to double attributes, if any. The ClassSection class will also have a constructor that accepts a parameter for each attribute. Lastly, it will have a toString method that returns a String containing labels and values for all of the attributes. A sample of the String produced by toString is shown below; notice that it uses new line characters to display parts of the String on different lines: : 20008 CRN Department : CIS Course number : 131 Instructional mode : Online : N/A : N/A Meeting days Meeting times Capacity Enrollment Instructor's ID : 30 : 30 : 666 After creating the Java file for class section, you need to create an application that uses it. We often call these applications driver programs. For our purposes, the driver program will create one instance of a class section object using its default constructor. Then it will use the object's setter methods to assign values to its attributes. After doing this, the driver will use either println or printf to display the String returned by toString. Next, it will create a second instance of a class section object using the constructor that accepts values for all of its attributes. Again, it will it will use either println or printf to display the String returned by toString. Provide your Java source code both the class section and the driver program. Since we have two files, compress them together into a file that contains your name then upload it to D2L

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!