write the Java file to define a class named Account This cla
write the Java file to define a class named Account. This class will be used to track a user account for a members only website.
Think about what attributes are needed. Each attribute should have an accessor; any attribute whose values can be changed should have a modifier. Create any appropriate constructors. Attributes whose values will not changed MUST be set in constructors.
Include comments explaining why you chose the attributes that you did. Also write comments for any utility functions you determine would be needed. You do not need to write those functions, but comment what would be their input parameters, and what they would do.
Solution
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
 package chegg;
import java.util.Date;
public class Account {
   
 private String firstName,lastName;
 private String userName,password;
 private Date dob;
 private String email;
   
 public Account(String firstName,String lastName,String userName,String password,String email,Date dob)
 {
 this.firstName = firstName;
 this.lastName = lastName;
 this.userName = userName;
 this.password = password;
 this.email = email;
 this.dob = dob;
 }
   
 public String getFullName()
 {
 return this.firstName + \" \" + this.lastName;
 }
   
 public String getUserName()
 {
 return this.userName;
 }
   
 public Date getDob()
 {
 return this.dob;
 }
   
 public String getEmail()
 {
 return this.email;
 }
   
 public void setFirstName(String firstName)
 {
 this.firstName = firstName;
 }
   
 public void setLastName(String lirstName)
 {
 this.lastName = lastName;
 }
   
 public void setUserName(String userName)
 {
 this.userName = userName;
 }
   
 public void setDob(Date dob)
 {
 this.dob = dob;
 }
   
 public void setEmail(String email)
 {
 this.email = email;
 }
   
 //Verifies email structure
 public boolean verifyEmail()
 {
 return false;
 }
 }


