Small Project Geared Get Started Writing Object Oriented Program Using Either Java C Crea Q43904973
This small project is geared to get you started on writingObject Oriented program using either Java or C++.
Create a class called Person that will hold information about asingle individual. This class should have a data section thatconsists of the following:
VariableName
DataType
firstName
string
lastName
string
address
string
The Person class should have the followingmutators:
-
setFirstName(string first);
-
setLastName(string last);
-
setAddress(string address);
The Person class should have the followingaccessors:
-
string getFirstName();
-
string getLastName();
-
string getAddress();
The Person class should have the followingconstructors:
-
Person(); – default
-
Person(string first, string last); – Set other fields to anempty string
-
Person(string first, string last, string address);
Note: You must use delegatingconstructors to eliminate duplicate code.
Main
Create an array which will hold 5 Person classes. Pass the arrayto a function called getPeople which will fill out the array withinformation about people taken from the keyboard. Create a secondfunction called printPeople which will take the array of Person’sand print it to the console window. Please format the output sothat it can be easily read and understood.
Expert Answer
Answer to This small project is geared to get you started on writing Object Oriented program using either Java or C++. Create a cl…
OR