Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

question pertains to the. given code 6. Analyze the implementation of a Class (30 pts) revney the simple Class defined below, and specity whether the

question pertains to the. given code image text in transcribed
image text in transcribed
image text in transcribed
6. Analyze the implementation of a Class (30 pts) revney the simple Class defined below, and specity whether the statements below are True (T) or False (F): The Student Class is Immutable. The Student Class is launchable / runnable (as an application) The Object Class is the parent/super Class of the Student Class The Student Class only offers a default constructor. The Student Class was designed with encapsulation in mind Explain: package my-package path import java.ut11 import java.text.* import java.io. public class Student private int id; private double gpa private String firstName private String lastName; private String emailddress; private String major private Date dob; public Student) public Student (double gPA, String firstName, String lastName, string emailAddress, String major, Date dob) ( super ) this. firstName = firstName ; this.lastName-lastName; this.emailAddress emailAddress; this.major majori this.dob dob public int getId) return idi public void setld(int D) id-iD public double getGpa) return gpai public void setGpa (double gPA) pagPA public String getFirstName ) return firstName public void setFirstName (String firstName) this.firstName-firstName public String getEmailAddress() return emailAddressi public void setEmailAddress (String emailAddress) ( this.emailAddress -emailAddress public String getLastName ) return lastName; public void setLastName (String lastName) this.lastName - lastName; publio string getMajorO return majoE public void setMajor (string major) { this.major- major public Date getDobO return dob public void setDob (Date dob) this.dob = dob; public static void main(String[) args) Student student - new Student string dobValue "02-17-1985" SimpleDateFormat simpleDateFormat new SimpleDateFormat ("MM-dd-yyyy) Date dob simpleDateFormat.parse (dobValue) student.setDob (dob); System.out.println (student)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions