Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

79 A A U TOI ! 1. Add a new package named hw2p3 to the project. a. Add a public class Student to hw2p3 package.

image text in transcribed
image text in transcribed
79 A A U TOI ! 1. Add a new package named hw2p3 to the project. a. Add a public class Student to hw2p3 package. No main method. b. Add a public launcher class StudentMain to hw2p3 package. It has a main method. 2. The detailed specification of the Student class is given below. Student name: String //private field name of type String -major String -course String -numCoursework int number of coursework, which is 10 or less coursework StringMXA COURSEWORK] Il such as exam, hw, project, paper, etc. max is 10 grades doubleMAX COURSEWORK /l need to declare a privat constant MAX COURSEWORK getName() String public method getName with return type String setName(name:String) vold Il parameter name of type String with no return type getMajor():String // no parameter with return type String setMajor major:String) vold *getCourse():String // no parameter with return type String *setCourse course String]:void getCoursework()-String) getGrades().doublell getNameAnd Major() String *addCourseworkGradework String, grade double) vold printAllString mycourse, String mywork, doubled mygradevold getAverage Grade().char printletterGradeldouble verrelechar // underlined means static Suppose you are required to model students. A student has a name and a major. You need to keep track of the coursework of a course taken by each student, together with the coursework grades (between 0 and 100) of the course. A course shall not have more than 10 coursework. The coursework may include exam, homework, project, paper, quiz, etc. You are required to print all coursework grades with its name, the overall average grade, and also final letter grade for a course taken by a student. 3. Write code for the Student class based on the spec given above. 4. Write code for the main method of the Student Main class to print output. A sample is whown below. Note that the Student Main class must have only one method main and variables must not be declared inside or outside the main method other than creating instances of the Student class. Jane Doe (MIS) MIS2281: Coursework, grades, average, and letter grade Jane Doe (MIS) MIS2201: Coursework, grades, average, and letter grade Exam: 95.0 HW1:80.0 HW2:100.0 Project:95.5 Paper:94.0 The average of coursework is 92.8 The letter grade is A John Doe (MKT) MIS3232: Coursework, grades, average, and letter grade Exam: 80.0 HW:90.0 Project:90.5 Paper:89.0 The average of coursework is 87.25 The letter grade is B John Doe (MKT) HR3000: Coursework, grades, average, and letter grade Exam: 80.0 HW1:90.0 HW2:100.0 Project:90.5 Paper:89.0 The average of coursework is 89.8 The letter grade is B

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions