can I get help writing this in C++ following these guidelines 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 in C++ following these guidelines
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 3 steps with 5 images