Question: Question Implement a Student class that has the following private attributes: name (String) id (String) startYr (int) e gradYr (int) and the following methods Constructor

 Question Implement a Student class that has the following private attributes:

Question Implement a Student class that has the following private attributes: name (String) id (String) startYr (int) e gradYr (int) and the following methods Constructor (that sets the name, id, startYr, gradYr from defined values) . Get and set methods tostring) method returns the name and ID of the student Then create a StudentDemo class to create and use Student objects. The StudentDemo class contains the main method. Use a Scanner object to read the attributes for a Student object. Create a Student object by passing in the attributes read in by the Scanner object. 1. Use the toString method to print out the name and ID of the student 2. Then use the get methods to print the startYr and gradYr 3. Change the id by adding the letter "G" to the end of the existing id 4. Use the toString method again to print the student information Details Input 5 strings in one line: name (first, last) id, start year, grad year Example Sample Input Sample Output Anne Lynd B1122 2018 2022 Name: Anne Lynd ID: B1122 2018 2022 Name: Anne Lynd ID: B1122G RUN ON TERMINAL Problem1 Check it

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!