Class design requirements:program should contain the following classes. Indentation indicates which classes are inner to others....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Class design requirements:program should contain the following classes. Indentation indicates which classes are inner to others. ● Student RecordManager - Private inner class TranscriptPrinter Student Here are the requirements for each class: Student RecordManager: Contains a list of Students. Course - Static inner enum Grade that has at least the following instances: A, B, C, D, F Tester Has the following instance methods: getStudent, removeStudent, addStudent, searchByID (which takes one integer and returns a Student with that ID, or null if no such student exists). ■ Instance method void printTranscript, which takes a Student argument and prints to the screen the Student's first name, last name, ID, and courses, with grade for each course. This method body must delegate the work to an instance of TranscriptPrinter. It could be a single line. Instance method void printAllTranscripts, which does the same as above, but for all students, one after the other. This method body must delegate the work to an instance of TranscriptPrinter. It could be a single line. Finally: iterator(), which must return an Iterator for the list of Students. ■ TranscriptPrinter: (Inner class) Inner class to StudentRecordManager. Actually does the printing to screen of transcripts. You can design this class any way you wish. ● Student: Contains a list of Course objects, a String first name, a String last name, and an integer ID. Has setter and getter methods for first name, last name, and ID. Has a method to add a Course to this Student's Course list. (A method to remove a Course is not required). A method to get the list of courses. (Normally, we would probably want an iterator over them, but returning the actual list is fine for this project). Course: Has instance variables String name and Grade grade. Has getter methods for each. Setters are optional (You can, if you wish, just initialize these values in the constructor). Grade: Static nested enum to Course. Don't be intimidated! Remember, enums are just classes whose list of instances are all created at startup (and which cannot be constructed thereafter). Has at least the following instances: A, B, C, D, F. Others are optional. · Tester: Creates a Student RecordManager with at least five Students. Calls printTranscript. Calls printAll Transcripts. Searches for a Student that exists, by ID, and prints that Student's first and last name. Removes a Student (could be the one from previous step, or any other, your choice). calls printAllTranscripts a second time. Note: These should be done in the above order! Testing single-student transcript print: Printing transcript for student First1 Last1 (#736271) : History W English A CompSci B Geophysics C Testing all-student transcript print: Printing transcript for student First1 Last1 (#736271) : History W English A CompSci B Geophysics C Printing transcript for student First2 Last2 (#395326) : English A Geophysics C CompSci I Geology W Printing transcript for student First3 Last3 (#447851) : English I Physics F Geology W History B Printing transcript for student First4 Last4 (#136334) : Physiology B History A Physiology A Physics D Printing transcript for student First5 Last5 (#352606) : English F CompSci C Physiology W CompSci A Searching for Student with ID 736271: Found Student with first, last name: First1 Last1 Removing that Student: 736271: Testing all-student transcript printer again: Printing transcript for student First2 Last2 (#395326) : English A Geophysics C CompSci I Geology W Printing transcript for student First3 Last3 (#447851) : English I Physics F Geology W History B Printing transcript for student First4 Last4 (#136334) : Physiology B History A Physiology A Physics D Printing transcript for student First5 Last5 (#352606) : English F CompSci C Physiology W CompSci A Class design requirements:program should contain the following classes. Indentation indicates which classes are inner to others. ● Student RecordManager - Private inner class TranscriptPrinter Student Here are the requirements for each class: Student RecordManager: Contains a list of Students. Course - Static inner enum Grade that has at least the following instances: A, B, C, D, F Tester Has the following instance methods: getStudent, removeStudent, addStudent, searchByID (which takes one integer and returns a Student with that ID, or null if no such student exists). ■ Instance method void printTranscript, which takes a Student argument and prints to the screen the Student's first name, last name, ID, and courses, with grade for each course. This method body must delegate the work to an instance of TranscriptPrinter. It could be a single line. Instance method void printAllTranscripts, which does the same as above, but for all students, one after the other. This method body must delegate the work to an instance of TranscriptPrinter. It could be a single line. Finally: iterator(), which must return an Iterator for the list of Students. ■ TranscriptPrinter: (Inner class) Inner class to StudentRecordManager. Actually does the printing to screen of transcripts. You can design this class any way you wish. ● Student: Contains a list of Course objects, a String first name, a String last name, and an integer ID. Has setter and getter methods for first name, last name, and ID. Has a method to add a Course to this Student's Course list. (A method to remove a Course is not required). A method to get the list of courses. (Normally, we would probably want an iterator over them, but returning the actual list is fine for this project). Course: Has instance variables String name and Grade grade. Has getter methods for each. Setters are optional (You can, if you wish, just initialize these values in the constructor). Grade: Static nested enum to Course. Don't be intimidated! Remember, enums are just classes whose list of instances are all created at startup (and which cannot be constructed thereafter). Has at least the following instances: A, B, C, D, F. Others are optional. · Tester: Creates a Student RecordManager with at least five Students. Calls printTranscript. Calls printAll Transcripts. Searches for a Student that exists, by ID, and prints that Student's first and last name. Removes a Student (could be the one from previous step, or any other, your choice). calls printAllTranscripts a second time. Note: These should be done in the above order! Testing single-student transcript print: Printing transcript for student First1 Last1 (#736271) : History W English A CompSci B Geophysics C Testing all-student transcript print: Printing transcript for student First1 Last1 (#736271) : History W English A CompSci B Geophysics C Printing transcript for student First2 Last2 (#395326) : English A Geophysics C CompSci I Geology W Printing transcript for student First3 Last3 (#447851) : English I Physics F Geology W History B Printing transcript for student First4 Last4 (#136334) : Physiology B History A Physiology A Physics D Printing transcript for student First5 Last5 (#352606) : English F CompSci C Physiology W CompSci A Searching for Student with ID 736271: Found Student with first, last name: First1 Last1 Removing that Student: 736271: Testing all-student transcript printer again: Printing transcript for student First2 Last2 (#395326) : English A Geophysics C CompSci I Geology W Printing transcript for student First3 Last3 (#447851) : English I Physics F Geology W History B Printing transcript for student First4 Last4 (#136334) : Physiology B History A Physiology A Physics D Printing transcript for student First5 Last5 (#352606) : English F CompSci C Physiology W CompSci A
Expert Answer:
Answer rating: 100% (QA)
Course Class public class Course enum Grade A B C D F String name Grade grade CourseString name Grade grade thisname name thisgrade grade String getName return name Grade getGrade return grade void se... View the full answer
Related Book For
Business Statistics In Practice
ISBN: 9780073401836
6th Edition
Authors: Bruce Bowerman, Richard O'Connell
Posted Date:
Students also viewed these programming questions
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
A 50 coaxial cable is connected to an 80 resistive load and a dc source with zero internal resistance. Calculate the voltage reflection coefficients at the source and at the load.
-
A transformer has an input of 6 V and an output of 36 V. If the input is changed to 12 V, show that the output would be 72 V.
-
If f (x) = x 2 , find f (x + h) - f (x) and simplify.
-
The Korvette concept was started and run by one person and his group of friends. How could its failure have been avoided? Was the problem one of strategy (overexpansion), or was it organizational?...
-
Hamilton County Parks is planning to develop a new park and recreational area on a recently purchased 100-acre tract. Project development activities include clearing playground and picnic areas,...
-
Warranties normally: Multiple select question. have indefinite lives. guarantee repair or replacement. represent liabilities. cover a specific time period.
-
For the unbalanced Wye-Wye (Y-Y) circuit shown in the figure determine the values the line currents for each phase. If Va = 1100, Vb = 110-120, Vc = 110120. What is the power per phase and total...
-
What are the 2 major theoretical perspectives of conflict and functionalism, and two differences between them?
-
As the only informatics nurse at your small community hospital, your chief nursing officer heavily relies upon you to translate major developments in policy and reimbursement that have direct...
-
Choose any 5 servers of the below list and explain the concept of them 1. Virtual Server 2. Blade Server 3. Database Server. 4. Application Server 5. Web Server. 6. Web Proxy Server 7. Authentication...
-
Organizational structures define the framework within which a company operates, delineating roles, responsibilities, and communication channels. These structures vary widely, ranging from traditional...
-
Sun Corp. had investments in trading debt securities costing $ 6 5 0 , 0 0 0 . On June 3 0 , Year 2 , Sun decided to hold the investments indefinitely and accordingly reclassified them as available -...
-
You receive the following email from Jean Marie: Hi again! I just received a few 1099s for a business I started in 2020. It is a Virtual Assistant business. Here is the information you will need for...
-
Some people argue that the internal control requirements of the Sarbanes-Oxley Act (SOX) put U.S. companies at a competitive disadvantage to companies outside the United States. Discuss the...
-
As part of its study, Gallup investigated a possible relationship between tipping attitudes and income. Using the poll results, the following row percentages can be obtained for three income...
-
The mean and the standard deviation of the sample of 40 trash bag breaking strengths are and = 50.575 and s = 1.6438. a. What does the histogram in Figure 2.17 say about whether the Empirical Rule...
-
William R. Dillon. Thomas J. Madden1 and Neil H. Firtle discuss a corporate image study designed to find out whether perceptions of technical support services vary depending on the position of the...
-
In the absence of limits on the behavior of large intermediaries, how might the perception of institutions being too-big-to-fail lead to increased concentration in the banking industry?
-
One goal of the regulatory reforms that followed the 2007-2009 financial crisis was to address the too-big-to-fail problem associated with large institutions. How did the reforms try to address this...
-
Analyze how a government regulates and supervises the financial system to contain risk.
Study smarter with the SolutionInn App