Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

and display it. Then, call the brake method five times. After each call to the b

ID: 3750677 • Letter: A

Question

and display it. Then, call the brake method five times. After each call to the brake get the current speed of the car and display it me 3. Personal Information Class al Design a class that holds the following personal data: name, address, age, and phone nun n bet. Write appropriate accessor and mutator methods. Demonstrate the class by witing em program that creates three instances of it. One instance should hold your information, n the other two should hold your friends' or family members' information. 4. Temperature Class

Explanation / Answer

Please find the class "PersonalInformation.java" below:-

public class PersonalInformation {

private String name;

private String address;

private int age;

private String mobile;

public PersonalInformation(String name, String address, int age, String mobile) {

this.name = name;

this.address = address;

this.age = age;

this.mobile = mobile;

}

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

public String getAddress() {

return address;

}

public void setAddress(String address) {

this.address = address;

}

public int getAge() {

return age;

}

public void setAge(int age) {

this.age = age;

}

public String getMobile() {

return mobile;

}

public void setMobile(String mobile) {

this.mobile = mobile;

}

public static void main(String[] args) {

PersonalInformation myInfo = new PersonalInformation("GOPAL MALAKER", "ADDRESS1", 28, "1234567890");

PersonalInformation family1 = new PersonalInformation("ALEX", "ADDRESS2", 56, "9876543221");

PersonalInformation family2 = new PersonalInformation("CHRISTINA", "ADDRESS3", 46, "9876543221");

}

}

Please let me know in case of any clarifications required. Thanks!