Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This small project is geared to get you started on writing Object Oriented program using either Java or C++. The Person Class Create a class
This small project is geared to get you started on writing Object Oriented program using either Java or C++. The Person Class Create a class called Person that will hold information about a single individual. This class should have a data section that consists of the following: Class Attributes Variable Name Data Type firstName lastName string string string address The Person class should have the following mutators: . setFirstName(string first); setLastName(string last): setAddress(string address); The Person class should have the following accessors: string getFirstName(); string getLastName(); string getAddress(); The Person class should have the following constructors: Person(); - default Person(string first, string last); - Set other fields to an empty string Person(string first, string last, string address); Note: You must use delegating constructors to eliminate duplicate code. Main Create an array which will hold 5 Person classes. Pass the array to a function called getPeople which will fill out the array with information about people taken from the keyboard. Create a second function called print People which will take the array of Person's and print it to the console window. Please format the output so the it can be easily read and understood
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started