Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Implement task using concepts of oop in cpp In this task, we will extend the class created in the previous task to include principals of
Implement task using concepts of oop in cpp
In this task, we will extend the class created in the previous task to include principals of inheritance. Create four classes UInt8, UInt16, UInt24 and UInt32. Those four classes will inherit from UInt which will act as base class. Similar to the previous class, each derived class will support arithmetic operations on different bit-width. For example, UInt8 will support operations on 8-bit memory. Your task is to move the common operations in the base class and use inheritance to create derived classes that support operations on different bit-width. Listing 4 provides the starting code of UInt and its derived classes. Listing 4: Task 2 #ifndef _UINT_H #define _UINT_H class UInt{ private: unsigned int *; public: UInt (); UInt (unsigned int); void set (unsigned int); const char * checkStatus() const; unsigned int size() const; lendif #ifndef _UINT8_H #define _UINT8_H class UInt8 : public Uint { /* Write your code here. */ #endif #ifndef _UINT16_H #define _UINT16_H Page class UInt16 : public Un 4 1 6 +Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started