Question: Implement a class called Student, whose constructor and public methods are listed in the table below. Each student has the attributes: name, list of modules,
Implement a class called Student, whose constructor and public methods are listed in the table below. Each student has the attributes: name, list of modules, address and an id. These attributes have types String, String [], String and String respectively. Method Semantics Student (String name, String[] modules, String address, String studentId) Constructor method for class getName() Returns the name of the student getmodules () Returns the students list of modules getAddress () Returns the students address getId() Returns the studentss id toString() Returns a string representation of the student
(b) Write a code fragment that creates one instance of the Student class and outputs the name and id of the student on the screen.
language java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
