Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In c + + A museum keeps a record of all its exhibited artworks. An art object may be a painting, a sculpture, or a

In c++ A museum keeps a record of all its exhibited artworks. An art object may be a painting,
a sculpture, or a statue.
Design an abstract class ArtWork that should have the following member variables:
total_number: This should be a static variable that keeps count of the total num
ber of artworks that are recorded.
serial: A serial number that should be automatically generated when an object of
a derived class is created.
artist: This stores the name of the artist.
year: This stores the year in which the art object was created.
The class ArtWork should have the following member functions:
A constructor that increments the member variable total_number and assigns the
serial number to the current value of total_number.
A mutator function.
An accessor function.
Derive a Painting class from the ArtWork class. It should have the following members:
type: This should denote the type of painting (like oil, watercolor, etc.).
drawn_on: This should store the material on which the painting is drawn (like can
vas, paper, wood, etc.).
Derive a Sculpture class from the ArtWork class. It should have the following mem
bers:
height: This should store the height of the glass box required.
size: This should store the length of the glass box. The length and breadth of the
boxes are always the same.
material: This should store the material with which the sculpture is made (like
stone, wood, wax, etc.).
Derive a Statue class from the ArtWork class. It should have the following members:
diameter: This should store the diameter of the pedestal required.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions