Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since:
Jul 2017
Last Sign in:
116 Weeks Ago, 2 Days Ago
Questions Answered:
15833
Tutorials Posted:
15841
Education
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University Mar-1995 - Mar-2002
Experience
Manager Planning
WalMart Mar-2001 - Feb-2009
Category > Computer SciencePosted 26 Mar 2018My Price10.00
Attributes for the Student’s name (String)
C&O - School: a) Write a class to represent a Student. This should include the following: i. Attributes for the Student’s name (String), course(String), and a unique studentID(int). ii. A default constructor which should set default values for all attributes. iii. A second constructor which accepts and sets values for each of the attributes. iv. Getter and setter methods for the name, and course. v. A Getter method for the studentID. vi. A method called showStudent() that takes no parameters, returns nothing and prints the information for each student to the screen followed by a seperation "---". (See sample output below). b) Write a main method in a new class called TestStudent and in this method: i. Declare an array of 3 Student objects. Instantiate each of the Student objects by obtaining the necessary attribute values from a user through keyboard input. See sample output of main method as a guide for correct input. ii. Print the details of each student using the showStudent() method. iii. Jacob in his first week decided he enjoyed computer science modules more and moved into CSSE. Use the relevant methods to change his course. Print Jacob's details to the screen. iv. Louise noticed an error with her name. Use the relevant method to correct the spelling to "Louise Johnson" and print just her name to the screen.