Question: The goal of this assignment is to implement a simple class. You will see how objects (as instances of a class) store their data, and

The goal of this assignment is to implement a simple class. You will see how objects (as instances of a class) store their data, and how methods access the data of an object. 1-Write a program with two classes, one main class called StudentTester with a main method, and another class called Student with the following specifications: 2-The student class should have these instant variables: name (String), id (integer) 3-The Student class should have the following methods: -a void method called setName that receives a String as input argument and assigns it to the name variable of that object. -a method called get name with no input argument which return the name of the student. 4-The Student Tester class should have a main method. From the main method create two student objects called student1 and student2.-Set a name for each student and add some courses for each.-Then with two separate print statements print out the name and enrolled courses for each student. A sample output should looks like this: Student1

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!