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
-
Current Attempt in Progress Marigold Corp. expects to purchase $240000 of materials in July and $256000 of materials in August. Three-fourths of all purchases are paid for in the month of purchase,...
-
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.
-
Let A be an m à n matrix and let Ï1 be the largest singular value of A. If x and y are nonzero vectors in Rn, show that each of the following holds: (a) (b)
-
11. Consider the Markov chain shown on the below. 3/4 1/4 % 3 2 (1) What is the period d of state 0? (2) What are the stationary probabilities , l, 2, and 3?
-
Ritter Company has a current ratio of 3.00 on December 31. On that date the company's current assets are as follows: Ritter Company's current liabilities at the beginning of the year were \(\$...
-
Travel Comfort Specialists, Inc. reported the following stockholders equity on its balance sheet at June 30, 2016: Stockholders' Equity Paid-In Capital: Preferred Stock6%, ? Par Value; 675,000 shares...
-
explain ( product going through market in term of LPC )
-
1. a. How much did the materials cost per unit change between June and July? b. How much did the conversion cost per unit change between June and July? 2. Which is the optimal choice of material and...
-
(b) Critical regions need to be protected in a system running multiple parallel processes. Semaphores represent one way in which access to critical regions are protected. A semaphore A used to access...
-
Discuss the internal and external forces for change today. Explain how managers can serve as change agents and describe what organizationAl elements are within a manager's control Explain why the...
-
Wheeling Manufacturing orders 8,000 units of graphite shafts for its production of golf clubs per week. The carrying costs of these shafts are $5 per unit per year and the fixed ordering cost is...
-
Discuss the marketing trend concept given below and explain with 2 suitable examples. a) experiential marketing b)Buzz Marketing c)Viral Marketing d) Ambush Marketing e) Other current trends of...
-
Thak Ltd has a special order. After evaluating the order, it was revealed that this would result in a loss of $2m. In addition, Thak Limited incurred a loss of $6 in its normal operation. Thak...
-
This course was very challenging and engaging. I really enjoyed everything that I learned during this course that will help me run a successful business. What have you learned in this course and...
-
Do you have to be logged in as a Domain Administrator to create and manage user accounts? Explain. 2. If a company is currently using Windows Server 2012 R2 and they need to change their server...
-
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...
-
Anderson Company must evaluate two capital expenditure proposals. fin Andersons hurdle rate is 12%. Data for the two proposals follow. Using net present value analysis, which proposal is the more...
-
Lakeland Company is considering the purchase of equipment for \($150,000\) The 4 equipment will expand the Companys production and increase revenue by \($40,000\) per year. Annual cash operating...
-
Assuming that money is worth 10%, compute the present value of 1.\($7,000\) received 15 years from today. 2.The right to inherit \($1,000,000\) 14 years from now. 3.The right to receive \($1,000\) at...
Study smarter with the SolutionInn App