Executes without crashing Appropriate Internal Documentation Pet Class Data members: name, type, weight Constructor/destructor Getters/setters as appropriate Main: The following items must be implemented in main() or by functions called from main() They must not be implemented in the Pet class Prompts user for the number of pets Creates the pet array using dynamic memory allocation Dynamically creates a pet object Generates a random weight (between 1-100 inclusive) for each pet Seed is 100 Prints contents of array as illustrated in diagram De-allocates memory (both the array and the contents of the array) before exiting Style: Modular design, no global variables, etc.
Can I get help writing this with these parameters
To give you an idea of the general criteria that will be used for grading, here is a checklist that
you might find helpful:
Executes without crashing |
Appropriate Internal Documentation |
Pet Class |
Data members: name, type, weight |
Constructor/destructor |
Getters/setters as appropriate |
Main: The following items must be implemented in main() or by functions called from main() They must not be implemented in the Pet class |
Prompts user for the number of pets |
Creates the pet array using dynamic memory allocation |
Dynamically creates a pet object |
Generates a random weight (between 1-100 inclusive) for each pet |
Seed is 100 |
Prints contents of array as illustrated in diagram |
De-allocates memory (both the array and the contents of the array) before exiting |
Style: |
Modular design, no global variables, etc. |
Step by step
Solved in 2 steps