Question: Create a Java Program following specifications: Write a class in Java named Student whose UML class diagram is shown below. The default (no- parameter) constructor
Create a Java Program following specifications:

Write a class in Java named Student whose UML class diagram is shown below. The default (no- parameter) constructor should initialize the String data members to the empty String("") and the double member to 0.0. The input method should allow users to input the values of the object's data members using prompted console input. Do not use pop-up dialog boxes for this input! The toString() method is important for effective output. Note that in the diagram, private access is denoted with a minus sign ( - ) and public access is denoted with a plus sign (+). String name Stringid Student // Student name //ID (5 + 8 digits) //Student GPA (0.0 to 4.0) double gpa + + Student) //Default constructor Student(String, String, double) //All parameters constructor String toString() void input() // Console input of Student object void set(String, String, double) //Sets all instance variables String getName() String getid) double getGPA) + + Write another class named Test that contains a main method. Use this as a driver program to test the constructors and the methods of the Student class. Paste your test runs into a Word document to include with your assignment submission. Write another class named DataStructure whose UML class diagram is shown below. The default (no- parameter) constructor should initialize the size data member to 100 and the next data member to zero. It should also declare the data array and its memory. The other constructor should do the same except for the size being a parameter. The add method should assign a Student object as the next element in the data array and increment the next variable. The showAll method should output all elements in the the data array. Student[ ] data int size int next DataStructure //array of Student objects //default size of array is 100 // index of next available array element + + DataStructure) DataStructure (int) void add(Student) void showall) //Default constructor //Constructor that sets capacity of structure //Inserts Student object into structure // Console output of all Students in structure + + Use your Test class to test the constructors and methods of the DataStructure class. Paste your test runs into your Word document to include with your accionmontaubmission
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
