I have to declare three objects of arrays with a named constant for the size. This is how I have it declared but in my program it says I have an error.
and Course is the name of my class. Can anyone give me tips on how to correctly write objects that are arrays
Declares an array of three Course objects (use a named constant for the size of the array)
Calls a function named init to get the initial values for all the member variables of a Person object
Prints the information for each person
But in the program we are asking three different people their name, last name and age and then at the end it prints all three of those individuals information...
I don't really know how to do it for three
@Disch okay thanks, but I wrote my code and it works almost perfectly except at the end where it should print all of the names, last names, and age, it only prints out the last name, and name the user entered for example:
Please enter the person's first name: Romeo
Please enter Romeo last name: Ruffini
Please enter Romeo Ruffinis age: 19
Romeo Ruffini is 19 years old
Please enter the person's first name: Grant
Please enter Grant last name: Goulden
Please enter Grant Gouldens age: 19
Grant Goulden is 19 years old
Please enter the person's first name: Gregg
Please enter Gregg last name: Zimmerman
Please enter Gregg Zimmermans age: 21
Gregg Zimmerman is 21 years old
is not an array of Course objects. It's 2 arrays of ints. That does not fulfill your requirements.
EDIT:
Actually now that I re-read your assignment... first it's talking about Course objects, then it's talking about Person objects. Which is it? =x Did you mistype it or something?
I can name it anything I want but it was course but its asking for people's name and last name and age. three we need to have three objects of arrays idk if that's correct. Btw thanks for your help