Question: Create a new class, Student.java that contains private data members: number: is a student number; name: is a string of the student's name, such as

Create a new class, Student.java that contains private data members:

number: is a student number;

name: is a string of the student's name, such as "Alice Wonderland";

dob: is the date of birth;

email: contains the email of the student;

address: the address of the student;

phone: contact phone number;

degree: degree of the student, such as "Bachelor of CS", "Master of IT";

In the file Student.java include:

Initialization constructor that assigns values to all data members;

Public access methods getNumber(), getName(), getDOB(), getEmail(), getAddress(), getPhone() and getDegree() that return values of private data members; Public update methods setNumber(int newNumber), setName(String newName), setDOB(String newDOB), setEmail(String newEmail), setAddress(String newAddress), setPhone(String newPhone) and setDegree(String newDegree) that update values of private data members;

Public overriding method toString() that returns of student information.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

import javautilDate public class Student private int number private String name private Date dob pri... View full answer

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 Operating System Questions!