Answered step by step
Verified Expert Solution
Question
1 Approved Answer
hi task 4 please ... thank you task 4 Define a class with name Device derived from abstract class Article. This class shall have following
hi
task 4 please ... thank you
task 4
Define a class with name Device derived from abstract class Article. This class shall have following members:
a private integer attribute with name main_memory storing the size of the main memory.
a private attribute with name os for the operating system of the device.
a public constructor with four parameters for the article name, the net price, the main memory size and the operating system with default parameter unknown; the tax rate shall be automatically initialised by the default parameter of class constructor Article.
a virtual public destructor producing an output "~Device()" at its call (see examples at the bottom).
a public method with name get_os without parameter returning the operating system.
a virtual public method with name print without parameter or return value outputting the article name, followed by "RAM", the main memory size, "GB" as well as the operating system (see examples at the bottom).
task 5
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