Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Create a package called Q1. 2. Create a Java class called Student according to the UML diagram. Specifications for the Student class - Constructor

image text in transcribed

1. Create a package called Q1. 2. Create a Java class called Student according to the UML diagram. Specifications for the Student class - Constructor without arguments - will assign all field values based on your personal information (your student number, full name with a score of 100). - Constructor with 3 arguments - will assign all field values based on the information passed in the arguments. - printInfo() method prints out the three field values with the help of printf() method that uses field width and justification as shown in the sample output. (Note: in the sample output, the field width of 20, 20, 3 and 2 have been used for presenting the name, student number, score, and letter grade, respectively, and all the data-items have used left justification.) - The accessor/getter method getName() returns the student's full name (the first name followed by a space followed by the last name), while getScore() returns the score of a student. - The mutator/setter methods setName(), setStudentName(), setScore() will set the appropriate values (see the UML diagram) received from the user. - Member method called getLetterGrade() will return the letter grade for the corresponding score according to the table given below (Hint: See Unit 5.1, slide 2426). 3. In the same Java package, create a driver class with the name StudentGradesByYourFirstName (YourFirstName should be your first name) and do the following

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Who made the decision?

Answered: 1 week ago