Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java PROBLEM 1: Student Success (30 points) For this first problem, you will implement a simple class: the Student class! All the information you should

java image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
PROBLEM 1: Student Success (30 points) For this first problem, you will implement a simple class: the Student class! All the information you should need can be found within the description of the Student class (to be created in the file Student.java) and in the UML diagram below. The Student class We always try to put students first! And now we are asking you to as well! Here you will construct the Student class based on the information below. Student Student -studentID: int -firstName: String -preferredName: String -lastName: String +Student (ID: int, firstName: String, lastName: String) +getStudentID(): int +getName(): String +setLastName (lastName: String): void +set PreferredName (preferredName: String): void +toString(): String Description of methods from the Student class: +Student (ID: int, firstName: String, lastName: String) Constructs a student with designated student ID, first name and last name. Preferred name is initially set to be the same as their first name. +get StudentID(): int Returns the integer student ID. +getName(): String Returns a string containing the student's preferred name in the form: "preferred-name last-name" +set Last Name (lastName: String): void Update the last name of a student. +getName(): String Returns a string containing the student's preferred name in the form: "preferred-name last-name" +set Last Name (lastName: String): void Update the last name of a student. +set PreferredName (preferredName: String): void Sets the name that the student would preferred to be called +toString(): String Overrides the existing string representation of the object to be: getName() + " (" + student-id + ")" Student.java New Full Screen $

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