For this project you are developing part of an application for a small college to retrieve...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
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... View the full answer
Posted Date:
Students also viewed these programming questions
-
You were asked to calculate the convexity of a 10 year bond that has a coupon of 2.80% and a YTM of 3.40%. You could have typed the numbers into the duration calculator rather than actually...
-
For this project you are tasked with building a user application that will select sets of random numbers. Your application must use functions and pass values. Your program will pick sets of 6 random...
-
For this project you will examine a set of data that you can apply the regression model to. Process Step 1 You need to find a set of data, preferably related to but not restricted to your field of...
-
Junes Garden Supplies purchases merchandise on account from Lawn Supplies, Inc. The list price is $1,600, with a trade discount of 25 percent, terms 1/10, n/30. Junes Garden Supplies pays the amount...
-
What is the small corporation exemption from the AMT? When is it available and not available?
-
Situation Management Services (SMS) provides consulting services to domestic and international clients. In providing these services, SMS developed copyrighted training materials consisting of several...
-
A friend of yours just told you an interesting story. While at their parents house over the weekend, your friends parents saw the textbook for an entrepreneurship class that your friend is completing...
-
Dr. Tarun Gupta, a Michigan vet, is running a rabies vaccination clinic for dogs at the local grade school. Tarun can shoot a dog every 3 minutes. It is estimated that the dogs will arrive...
-
(a) (b) In a liberalised economy, market forces of demand and supply dictate the interest rates and exchange rates in the market. With reference to the above statement, analyse two justifications why...
-
Alice has invented a new card game to play with Bob. Alice made a deck of cards with random values between 1 and 52. Bob picks 5 cards. Then, he has to rearrange the cards so that by utilizing the...
-
The financial statements of Plate Limited for the financial year 1 are as follows: Statement of Financial Position at 31 December Year 1 Sm ASSETS Non-Current Assets Intangible assets Tangible assets...
-
What is the output of the following program: digit="1-2, buckle my SHOE!" digit.upper() str digit.lower print("upper case: + str) print("lower case: + digit)
-
6. Find the binary equivalent for the following decimal numbers. Finfl the round off error, if there is any: [1 mark] a. (5.75)10= b. (2.625)10=
-
a) What is the minimum speed with which a meteor strikes the top of Earth's stratosphere (about 43.5 km above the surface), assuming that the meteor begins as a bit of interplanetary debris far from...
-
You'd like to analyze some attributes of a typical Mac 'n Cheese pizza from lan's. The percent of the pizza that is covered in macaroni noodles is normally distributed with a (population) standard...
-
Assume that individuals have identical preferences and that each has a demand curve for internet services of the following form: P = 53 - 2Q where P is the price per hour and Q is hours per month....
-
Directions Correct the following sentences by adding semicolons or colons where needed. 1. The assistant researched material for the report the manager wrote the report. 2. My brother plans to learn...
-
What are technical skills At what level are they most important and why?
-
One growing concern regarding the U.S. economy is the inequality in the distribution of income. The data in Table 1 represent the distribution of household income for various levels of income in...
-
One growing concern regarding the U.S. economy is the inequality in the distribution of income. An economist wants to know if the distribution of income is changing, so she randomly selects 1500...
-
Test whether \(\mu_{1}
Study smarter with the SolutionInn App