Question: deducted if no header comments are included. Programming Problem In this exercise, you will write a program that loads information about dogs from a text







deducted if no header comments are included. Programming Problem In this exercise, you will write a program that loads information about dogs from a text file and displays the data to the user in a formatted table. The name of the text file should be provided as a command line argument. Error messages should be displayed if the file name is missing on the command line, if the file is not found, or if the file is not formatted correctly for input. Sample Output ./pet_manager Correct usage: ./pet_manager filename ./pet_manager notafilerealfile File notafilerealfile could not be opened ./pet_manager baddogs.txt The data file is not formatted correctly ./pet_manager dogs.txt Name Age Breed Rover 10 baddog Tim 12 Terrier Grogu 50 Jeddi The oldest dog is 50 years old. Its name is Grogu Required Files and Classes The following files are required for the project: driver.cpp . Class: Dog O dog.h o dog.cpp Class: DogManager . dogmanager.h Activate Windows Class: DogManager . dogmanager.h dogmanager.cpp Class: DogTablePrinter o dogtableprinter.h o dogtableprinter.cpp makefile File: driver.cpp The important concepts in this project are in the Dog and DogManager classes. The driver.cpp file has therefore been supplied to you to provide guidance in using the classes. The main function shows how the other classes are to be used. Warning You must use this file as-is. Modifications are not allowed. You will need to provide default and copy constructors for both the Dog and DogManager classes in addition Important to the parameterized constructors outlined below. Class: DogManager Files dogmanager.h, dogmanager.cpp Overview These files should implement the DogManager class. The class is responsible for loading and maintaining dog data. The implementation of functions for the class must be in the cpp file, not the file. Attributes The following are the required private attributes of the DogManager class: vector dogList; // holds dogs loaded from file Functions The following are the required functions for the class. You may add other private functions as needed. The public Screenshot saved Acthe screenshot was added to your Go OneDrives to activate Windows. Getters and Setters This is a case where you do not create getters and setters. The doglist should only be manipulated internally. The class can optionally pass it to other classes as needed in this case, the DogTablePrinter class). Function: DogManager dm (string filename) (parameterized constructor) Input: the name of the file containing the dog information Output: instance of DogManager class This constructor should call the private function loadDogs (see below). Function: loadDogs (string filename) Access level: private Input: the name of the file containing the dog information Returns: instance of DogManager class The pseudo-code below shows the expected flow for this function: open file for each line in the file read the line create a dog object and add it the vector of dog objects Exceptions: This function must throw an exception if the file supplied cannot be opened. The message should read "File could not be opened", where is the name of the file that was supplied on the command line. Technical requirements: This function populates the private attribute vector doglist Function oldestDog Access level: public Input: None Returns: the Dog object that has the highest age of those currently loaded Function printDogs Access level: public Screenshot saved Acthe screenshot was added to your Input: None Only one public function is required. You may use private functions as needed. Function printDogTable() Access level: public Input: vector containing all the dogs that have been loaded in the system Return: none Output: prints table of dogs. See the example output above for the required output format Class: Dog Files dog.h, dog.cpp Overview These files should implement the Dog class. The class is responsible for holding all attributes of a dog. The implementation of functions for the class must be in the cpp file, not the n file. Attributes The following are the required private attributes of the Dog class: string name; // name of the dog int age; // its age in years string breed; // the dog breed (Terrier, Bloodhound, etc. Functions The following are the required functions for the class. You may add other private functions as needed. The public interface should not change. Getters and Setters Create getters and setters for all class attributes. Function Dog (string name, int age, string breed) Access level: public Input: dog name, age, and breed Screenshot saved Acthe screenshot was added to your Go OneDrive.s to activate Windows. Return: instance of Dog object (this is constructor, so no explicit return!) Attributes The following are the required private attributes of the Dog class: string name; // name of the dog int age; // its age in years string breed; // the dog breed (Terrier, Bloodhound, etc. Functions The following are the required functions for the class. You may add other private functions as needed. The public interface should not change. Getters and Setters Create getters and setters for all class attributes. Function Dog(string name, int age, string breed) Access level: public Input: dog name, age, and breed Return: instance of Dog object (this is constructor, so no explicit return!) Submission details To submit your project, you will have to use git on your VirtualBox installation: 1. After accepting the assignment invitation, copy the clone URL 2. cd into your new assignment directory 3. After working on your files , when you're ready, type the following commands: git add. git commit -m " dogList; // holds dogs loaded from file Functions The following are the required functions for the class. You may add other private functions as needed. The public Screenshot saved Acthe screenshot was added to your Go OneDrives to activate Windows. Getters and Setters This is a case where you do not create getters and setters. The doglist should only be manipulated internally. The class can optionally pass it to other classes as needed in this case, the DogTablePrinter class). Function: DogManager dm (string filename) (parameterized constructor) Input: the name of the file containing the dog information Output: instance of DogManager class This constructor should call the private function loadDogs (see below). Function: loadDogs (string filename) Access level: private Input: the name of the file containing the dog information Returns: instance of DogManager class The pseudo-code below shows the expected flow for this function: open file for each line in the file read the line create a dog object and add it the vector of dog objects Exceptions: This function must throw an exception if the file supplied cannot be opened. The message should read "File could not be opened", where is the name of the file that was supplied on the command line. Technical requirements: This function populates the private attribute vector doglist Function oldestDog Access level: public Input: None Returns: the Dog object that has the highest age of those currently loaded Function printDogs Access level: public Screenshot saved Acthe screenshot was added to your Input: None Only one public function is required. You may use private functions as needed. Function printDogTable() Access level: public Input: vector containing all the dogs that have been loaded in the system Return: none Output: prints table of dogs. See the example output above for the required output format Class: Dog Files dog.h, dog.cpp Overview These files should implement the Dog class. The class is responsible for holding all attributes of a dog. The implementation of functions for the class must be in the cpp file, not the n file. Attributes The following are the required private attributes of the Dog class: string name; // name of the dog int age; // its age in years string breed; // the dog breed (Terrier, Bloodhound, etc. Functions The following are the required functions for the class. You may add other private functions as needed. The public interface should not change. Getters and Setters Create getters and setters for all class attributes. Function Dog (string name, int age, string breed) Access level: public Input: dog name, age, and breed Screenshot saved Acthe screenshot was added to your Go OneDrive.s to activate Windows. Return: instance of Dog object (this is constructor, so no explicit return!) Attributes The following are the required private attributes of the Dog class: string name; // name of the dog int age; // its age in years string breed; // the dog breed (Terrier, Bloodhound, etc. Functions The following are the required functions for the class. You may add other private functions as needed. The public interface should not change. Getters and Setters Create getters and setters for all class attributes. Function Dog(string name, int age, string breed) Access level: public Input: dog name, age, and breed Return: instance of Dog object (this is constructor, so no explicit return!) Submission details To submit your project, you will have to use git on your VirtualBox installation: 1. After accepting the assignment invitation, copy the clone URL 2. cd into your new assignment directory 3. After working on your files , when you're ready, type the following commands: git add. git commit -m "