Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java langauge Create a package named Q1. Create a java class named Student according to Student the UML diagram -name: String -student Number: int Specifications

java langauge image text in transcribed
image text in transcribed
Create a package named Q1. Create a java class named Student according to Student the UML diagram -name: String -student Number: int Specifications for the Student class -score: int Constructor without arguments - will assign all field values based on the information *Student pertaining to a fictional character of your Student nm: String, sNum:int, scint) choice. getinfo(): vold Constructor with 3 arguments will assign all *getName(): String field values based on the information passed in getScore(): Int the arguments *getLetterGrade(): String o getInfo() method prints out the three field values separated by fixed tab spacing (). For example: John Doe 111222 87 Note: Use any print method of your choice. o The accesso/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 Member method called get letterGrade will return the letter grade according to the table given at the end In the same Java package, create a new driver class with the name StudentGrades By Your FirstName Specifications for the driver class Inside the main method, call print Header) 6 First student: Declare a Student type reference variable and instantiate it to create an object with the help of the constructor without argument. Second student: Declate another Student type reference variable and instantinte it using the constructor with three arguments. Choose your own values here. Print the information for the first student. Print his/her/their letter grade. Print the information for the second student. Print his her their letter grade . Compare the ones and display which student scored higher. Note: Use any print method of your choice Assumption: score will always be between 0 and 100. No validation required. Hint: You must use if-elso-sf statements. See resources Week 6 Unit 5 (brief version) (slide 20-23) Intelli: Working with statements and some Short cut techniques Sample output Your Full Name Lab?, Questions? Score Letter Grade o Print the information for the second student. Print his/her/their letter grade. o Compare the scores and display which student scored higher. Note: Use any print method of your choice. Assumption: score will always be between 0 and 100, No validation required. Hint: You must use if-else-if statements. See resources Week 6 -> Unit 5 (brief version) (slide 20-23) o IntelliJ: Working with If-statements and some Short-cut techniques. Sample output: Your Full Name Lab #?, Question #? Letter Grade A+ Here is my information: A- 50 Harry Potter 211980 Letter grade C+ B+ Seore 90 or greater 80-89 70-79 60-69 50-59 40-49 30-39 29 or less B- 87 Ron Weasly 217777 Letter grade A- C+ C- Ron Weasly scored higher than Harry Potter! D *** Goodbye from your FullName *** F

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

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students also viewed these Databases questions

Question

=+What is the nature of the plant or site-level role of unions?

Answered: 1 week ago