Question: please code in java PROBLEM 1: Student Success [30 points] For this first problem, you will implement a simple class: the Student class! All the
please code in java
![please code in java PROBLEM 1: Student Success [30 points] For this](https://s3.amazonaws.com/si.experts.images/answers/2024/08/66c6baa1c4704_93766c6baa1487b0.jpg)

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 -studentID: int -firstName: String -preferredName: String -lastName: String +Student (ID: int, firstName: String, lastName: String) +get StudentID(): int +getName(): String +setLastName (lastName: String): void +setPreferredName (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. +getStudentID(): int Returns the integer student ID. +getName(): String Returns a string containing the student's preferred name in the form: "preferred-name last-name" +setLastName (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 + ")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
