Question: In this lab you will create a Person class and 2 objects of this class. You will also display the data from each object. Deliverable

In this lab you will create a Person class and 2 objects of this class. You will also display the data from each object. Deliverable A zipped NetBeans project with 2 classes App - Person Classes The Person Class The attributes - String firstName - String lastName - String hometown - String state The App class Create 2 Person objects called p1 and p2. - p1 data: firstName - Jillian lastName - Jennings hometown - Montclair state - NJ - p2 data: firstName - Keaton lastName - Ellis hometown - State College state - PA 1. display the the data for each object as specified below: - if the state attribute is "PA", display the object's attribute name plus the message "is from Pennsylvania" - if the state attribute is not "PA". display the object's attribute name plus the message "is from out-of-state" - make sure you display the data using the objects p1 and p2 - A statement using a fixed string is not a correct answer - System.out.println("Jillian is out-of-state"); is not the answer - looking at the data and having specific "system.out" is not the correct answer - You need to use if statements (or other kind of tests) to handle any variable/object
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
