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

please write a Pseudo-Code for this code below , Thank you so much! public class

ID: 3812625 • Letter: P

Question

please write a Pseudo-Code for this code below , Thank you so much!

public class Person {

private String name;
private String address;
private String phoneNumber;

public Person(String name, String address, String phoneNumber) {
this.name = name;
this.address = address;
this.phoneNumber = phoneNumber;
}

public String getAddress() {
return address;
}

public void setAddress(String address) {
this.address = address;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getPhoneNumber() {
return phoneNumber;
}

public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
}

==============================================================

public class Customer extends Person {

private int customerNumber;
private boolean onList;

public Customer(String name, String address, String phoneNum, int number, boolean onList) {
super(name, address, phoneNum);
this.customerNumber = number;
this.onList = onList;
}

public int getCustomerNumber() {
return customerNumber;
}

public void setCustomerNumber(int customerNumber) {
this.customerNumber = customerNumber;
}

public boolean isOnList() {
return onList;
}

public void setOnList(boolean onList) {
this.onList = onList;
}
}

=====================================================

public class CustomerDemo {

public static void main(String[] args) {

Customer customer1 = new Customer("Judy Smith", "123 Maple Lane", "555-305-9876", 1, true);
Customer customer2 = new Customer("Bob White", "456 Oak Road", "555-895-4931", 2, true);
Customer customer3 = new Customer("Garry Goodman", "789 Acorn Avenue", "555-587-2983", 3, false);

System.out.println("Customer 1:");
System.out.println(" Name: " + customer1.getName());
System.out.println(" Address: " + customer1.getAddress());
System.out.println(" Phone Number: " + customer1.getPhoneNumber());
System.out.println(" Customer Number: " + customer1.getCustomerNumber());
System.out.println(" On Mailing List: " + customer1.isOnList());

System.out.println("Customer 2:");
System.out.println(" Name: " + customer2.getName());
System.out.println(" Address: " + customer2.getAddress());
System.out.println(" Phone Number: " + customer2.getPhoneNumber());
System.out.println(" Customer Number: " + customer2.getCustomerNumber());
System.out.println(" On Mailing List: " + customer2.isOnList());

System.out.println("Customer 3:");
System.out.println(" Name: " + customer3.getName());
System.out.println(" Address: " + customer3.getAddress());
System.out.println(" Phone Number: " + customer3.getPhoneNumber());
System.out.println(" Customer Number: " + customer3.getCustomerNumber());
System.out.println(" On Mailing List: " + customer3.isOnList());
}

}

Explanation / Answer

Pseudo-Code

--- Program start it's execution

1)(main method call) main method in CustomerDemo Class.
           A) A new customer object get's created with the passed values as "Judy Smith", "123 Maple Lane", "255-305-9876",1,true and initialize the Customer Numebr and OnList attribute of Customer.
                1) while creating object of Customer, it call the customer parametrised constructor, as this constructor calls to the base constructor Person with name,address and phone number value, Person's class constructor assign the values to name,address and phone number attribute.
                         
           B) Second new customer object get's created with the passed values as "Bob White", "456 Oak Road", "255-895-4931",1,true and initialize the Customer Numebr and OnList attribute of Customer.
                1) while creating object of Customer, it call the customer parametrised constructor, as this constructor calls to the base constructor Person with name,address and phone number value, Person's class constructor assign the values to name,address and phone number attribute.
           C) Third new customer object get's created with the passed values as "Bob White", "456 Oak Road", "255-895-4931",1,true and initialize the Customer Numebr and OnList attribute of Customer.
                1) while creating object of Customer, it call the customer parametrised constructor, as this constructor calls to the base constructor Person with name,address and phone number value, Person's class constructor assign the values to name,address and phone number attribute.
           D) Prints the values of customer1 object. (Name, address, phone number, customer number, On mailing list.)
           E) Prints the values of customer2 object. (Name, address, phone number, customer number, On mailing list.)
           F) Prints the values of customer3 object. (Name, address, phone number, customer number, On mailing list.)