Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For this project you are developing part of an application for a small college to retrieve and display student records. As part of the
For this project you are developing part of an application for a small college to retrieve and display student records. As part of the project you will create three classes,(Classroom, Course, Student) each with four data fields. Part A (20 Points) Create a class Classroom, the class contains the following data fields and data types. Data Type String String Integer Boolean Data Fields name (e.g. RBUS108) location ( location of classroom, e.g. COB) capacity ( the capacity of the classroom, e.g. 18 students) hasComputer ( are there computers in room, values are yes or no ) Create set methods and get methods for each of the data fields. Add a constructor that will require the name of the classroom as a parameter. Classroom(RUS789). Save the file as Classroom.java *************************************** 1 Part B ( 20 points) Create a Course class, the class contains the following data fields and data types. Data Type String Integer Classroom object String Data Fields course ID (for example, BINS4213) credit hours (for example, 3), classroom for class meetings department ( e.g. BINS, Accounting) Include get and set methods for each field. The set and get methods for the Classroom object should set an instance of the Classroom class and return an instance of the Classroom class that you created. Add a constructor for the class. The constructor requires the course ID as parameter, and it creates a course object with the course ID and set the credit hours to 3. Save the file as Course.java ******************************************************* Part C (20 points) Create a Student class. the class contains the following data fields and data types. Data Type String String Course[ ] Data Fields last name (e.g. Smith) ID number (e.g. T78789) myCourses (an array of 4 Course objects) creditPoints (e.g. 30.75) Double Create get and set methods for the data fields Create a static method computeGPA(Course [ ] studentCourses, double pointsEarned ) that will require an array of Course[ ] objects and points earned as parameters, loop through the array of courses to get the credit hours and then sum them up and use the total of credit hours and points to compute and return GPA. Save the file as Student.java Part D ( 40 points) Create DisplayRecords class with a main method that will test the 3 classes that you created using the values in the tables below for the data fields for each of the classes objects that you instantiate. The starter file should help you get started. 2 Student Field Value Last Name Gates Student ID T996633 Credit Points 41.75 Courses[ ] BINS4308, BINS4309, BINS4310, BINS4311* BINS4308 is in classroom RBUS308 BINS4309 is in classroom RBUS309 BINS4310 is in classroom RBUS310 BINS4311 is in classroom RBUS311 Course Classroom Field Classroom Name RBUS110 ity Field Value Value Course ID BINS4308 Credit Hours 3 (all courses are 3 credit hours) 15 Classroom RBUS108B College of Business Location Departments BINS hasComputer Yes Below is an image of the starter file for the DisplayRecords.java import java.util.Scanner; public class DisplayRecords { public static void main (String [] args) { // create a new student object student me = new Student (); //create 4 classrooms for the 4 courses Classroom classrooml = new Classroom ("RBUS308"); Classroom classroom2 = new Classroom ("RBUS309"); Classroom classroom3 = new Classroom ("RBUS310"); Classroom classroom4 = new Classroom ("RBUS311"); //Course myCourses [] ; //Create 4 course objects for the Course BINS4308 = new Course ("BINS4308") ; Course BINS4309 = new Course ("BINS4309"); Course BINS4310= new Course ("BINS4310"); Course BINS4311 = new Course ("BINS4311"); array of courses // Create an array of courses Course mycourses [] = {BINS4308, BINS4309, BINS4310, BINS4311 }; Display the class information on the console similar to the image below 3 : T996633 student Name : Bates Student ID ****** ******** courses BINS4308 BINS4309 BINS4310 BINS4311 : 12 : 40.75 : 3.40 Credit Hours Points Eraned Grade Point Average ******* ****** Class Location Classroom for BINS4308 is RBUS308 Classroom for BINS4309 is RBUS309 Classroom for BINS4310 is RBUS310 Classroom for BINS4311 is RBUS311 Modify the DisplayRecords.java to prompt the user for the last name and student ID and points earned, then use that information to modify the student object and display modified information as shown below in the image. .Save the file as DisplayRecords.java. Enter You ID >>> T6123908 Enter Your last name >>> Richardson Enter earned Points >>> 35.6 Student ID T6123908 student Name : Richardson *** ******** courses BINS4308 BINS4309 BINS431O BINS4311 : 12 : 35.6 Grade Point Average : 2.97 Credit Hours Points Earned ****** Class Location BINS4308 is RBUS308 BINS4309 is RBUS309 BINS4310 is RBUS310 Classroom for BINS4311 is RBUS311 Classroom for Classroom for Classroom for
Step by Step Solution
★★★★★
3.34 Rating (160 Votes )
There are 3 Steps involved in it
Step: 1
I HAVE DONE ALL COMPUTATIONS IN DISPLAYRECORDS AND ALL OTHER FILES ARE ACCORDING TO THE WAY MENTIONED SO I HAVE NOT INCLUDED COMMENTS IN THEM DISPLAYRECORDS HAS ALL THE COMMENTS NECESSARY TO UNDERSTAN...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started