Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

assuming question 3 is DONE. only question 4( polymorphism) The answer to question 3 is as following in the pictures below question 4 ( last

assuming question 3 is DONE. only question 4( polymorphism) image text in transcribed
image text in transcribed
The answer to question 3 is as following in the pictures below
question 4 ( last photo ) ( polymorphism) is using question 3 that i have already done, which is why i attached q3 image text in transcribed
image text in transcribed
image text in transcribed
Question 3: Inheritance Consider the following Art class Pain .() or Statues () oil , ink , or acryl) type (29 points) ng Art class, which represents an art item ( J). Art items could be Painti ). Paintings are art items with addition features like width and height, and col k, or acrylic). Statues are art items also that have features like weight, and material er, or clay). The price of the painting is based on the size (width* height) and the year dial sales(gold, silver, or clay). The of production Class Art E l string title; // float price; // Lebile int year; // U publie: Art(string n, float p, int y): void set Year(); void setTitle : int getYear(); string getTitle(); virtual string GetType()-0; // "Painting" or "Statue" virtual float getPrice( ) 0; virtual void print InfoOf cout200 99 stez-250) Pt 300; else if (size 2250) P+= 300:1 Page 5 of 9 else pt = 0; if I get Vear 1) 200 99 stez-250) Pt 300; else if (size 2250) P+= 300:1 Page 5 of 9 else pt = 0; if I get Vear 1)

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

Database Administration The Complete Guide To Dba Practices And Procedures

Authors: Craig S. Mullins

2nd Edition

0321822943, 978-0321822949

More Books

Students also viewed these Databases questions

Question

What is human nature?

Answered: 1 week ago