Question: Directions: Please complete the following assignment to signify your completion of Unit 17. All programming projects need to be completed and submitted electronically, following the

 Directions: Please complete the following assignment to signify your completion ofUnit 17. All programming projects need to be completed and submitted electronically,following the Electronic Submission Guidelines discussed in class. Please cherry-pick from yoursolution folder and submit just the .cpp and h files you createdor modified as well as.exe file that Visual Studio built from your

Directions: Please complete the following assignment to signify your completion of Unit 17. All programming projects need to be completed and submitted electronically, following the Electronic Submission Guidelines discussed in class. Please cherry-pick from your solution folder and submit just the .cpp and h files you created or modified as well as.exe file that Visual Studio built from your code Background This assignment deals with inheritance. Inheritance is one of the major principles of object-oriented programming. In C++, one of the biggest goals is "code reuse". Inheritance accomplishes this. In order to get inheritance working in C++, you must get both the structure of your.h files as well as the implementation of your constructor correct. Constructor implementations must use an initialization list. Please review the book and the online content on these issues so you know how it works before you begin. part a: flashdrive 4.0 (inheritance) The purpose of this assignment is to work with exceptions and inheritance. As you may reca have provided you with a sample class named FlashDrive which has been diagrammed below. You will reuse code from previous assignments and further extend it. I'd like you to enhance this class so that invoking its methods or operators potentially throw a custom exception, rather than just a std::logic_ error. As you may recall, you can create a logic_error by passing a string value to its constructor. Officially, you should also say #include to begin working with logic error, but Visual Studio (being a badly behaved child...) let's you get away with it For this assignment, you will want to focus on subclassing std:logic_error. In each exceptional situation, rather than writing errors to cout or throwing std:logic_error, please create and throw a custom subclass as shown below: std::logic error std:logic_error logic error std:string message ) std string what) std:string message UnderflowingFlashDriveException OverflowingFlashDriveException Please remember that subclasses really MUST call their parent class constructors by using an initialization list Directions: Please complete the following assignment to signify your completion of Unit 17. All programming projects need to be completed and submitted electronically, following the Electronic Submission Guidelines discussed in class. Please cherry-pick from your solution folder and submit just the .cpp and h files you created or modified as well as.exe file that Visual Studio built from your code Background This assignment deals with inheritance. Inheritance is one of the major principles of object-oriented programming. In C++, one of the biggest goals is "code reuse". Inheritance accomplishes this. In order to get inheritance working in C++, you must get both the structure of your.h files as well as the implementation of your constructor correct. Constructor implementations must use an initialization list. Please review the book and the online content on these issues so you know how it works before you begin. part a: flashdrive 4.0 (inheritance) The purpose of this assignment is to work with exceptions and inheritance. As you may reca have provided you with a sample class named FlashDrive which has been diagrammed below. You will reuse code from previous assignments and further extend it. I'd like you to enhance this class so that invoking its methods or operators potentially throw a custom exception, rather than just a std::logic_ error. As you may recall, you can create a logic_error by passing a string value to its constructor. Officially, you should also say #include to begin working with logic error, but Visual Studio (being a badly behaved child...) let's you get away with it For this assignment, you will want to focus on subclassing std:logic_error. In each exceptional situation, rather than writing errors to cout or throwing std:logic_error, please create and throw a custom subclass as shown below: std::logic error std:logic_error logic error std:string message ) std string what) std:string message UnderflowingFlashDriveException OverflowingFlashDriveException Please remember that subclasses really MUST call their parent class constructors by using an initialization list

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!