1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Mkey [24]
3 years ago
6

Create a Painting class that holds the painting title, artist name, and value. All Paintings are valued at $400 unless they are

FamousPaintings. Include a display function that displays all fields. The FamousPainting subclass overrides the Painting value and sets each Painting’s value to $25,000.
Business
1 answer:
AlexFokin [52]3 years ago
6 0

Answer:

#include<iostream>

#include<string>

#define N 10

#define M 4

using namespace std;

class Painting

{

protected:

string title;

string author;

int value;

public:

Painting(string Title="", stringAuthor="",int Value=400) {title=Title;author=Author;value=Value;}

void setTitle(string newTitle){title=newTitle;}

void setAuthor(string newAuthor){author=newAuthor;}

void display() {cout<<"Title:"<<title<<endl; cout<<"Author:

"<<author<<endl<<"Value:

"<<value<<endl;}

};

class FamousPainting:public Painting

{

public:

FamousPainting(string Title, stringAuthor, int Value=25000): Painting(Title,Author,Value){}

};

int main()

{

Painting *paintings=new Painting[N];

stringfamous[M]={"Degas","Monet",

"Picasso","Rembrandt"};

string title, author;

int i,k,j;

for(i=0;i<N;i++)

{

cout<<"Input title: ";

getline (cin, title);

cout<<"Input author: ";

getline (cin, author);

k=-1;

for(j=0;j<M;j++)

if(famous[j]==author)

{

k=j;

break;

}

if(k>=0)

paintings[i]=FamousPainting(title,author);

else

paintings[i]=Painting(title,author);

}

for(i=0;i<N;i++)

{

cout<<"Painting#"<<i<<":"<<endl;

paintings[i].display();

}

return 0;

}

Explanation:

You might be interested in
Glen wants to take a holiday that costs $8,850, but currently he only has $2,750 saved. if he invested his money at 8 percent in
Katarina [22]
<span> <span>Solution:

A = P(1+r)^n

where,
A = amount
P = principal
r = rate of interest
n = number of years

Putting values in the formula,

8850 = 2750(1+0.08)^n

8850/2750 = (1+0.08)^n
log will be used to solve "n" as it is in the exponent form, which gives,

log(8850/2750) = n log(1+0.08)

By solving, we get n = log(8850/2750) / log(1+0.08)

Using financial calculator, value comes as 15.187 rounded to 15.19.

So, he will have to wait for 15.19 years to take holidays as it will take 15.19 years to make $8850 from $2750 @ 8% annual compounding.</span> </span>
4 0
3 years ago
The pre-tax cost of debt for a firm: is based on the yield to maturity on the firm's outstanding bonds. is equal to the coupon r
Molodets [167]

Answer:im sorry i dont know

Explanation:

8 0
3 years ago
Which term is used when businesses do not maximise output from given inputs ?​
Sergio [31]

Answer:

What Is Efficiency? Efficiency signifies a peak level of performance that uses the least amount of inputs to achieve the highest amount of output.

4 0
2 years ago
A. medical payment auto 1. covers insured for life; is paid on for a specific-
ivolga24 [154]

Answer:

E. property damage auto 5. pays if insured is at fault and someone else's-  

property is damaged

5 0
3 years ago
Read 2 more answers
Entry for Issuing Materials Materials issued for the current month are as follows: Requisition No. Material Job No. Amount 201 A
Svetradugi [14.3K]

Answer:

The journal entry is as follows:

Work in process A/c                 Dr. $158,700

Manufacturing overhead A/c   Dr. $2,250

To Raw material inventory                               $160,950      

(To record the issuance of materials)

Workings:

  • Work in process is debited with direct material:

        =  88,700 + 27,600 + 3,650 + 38,750

        = $158,700

  • Manufacturing overhead debited with indirect material cost = $2,250

5 0
3 years ago
Other questions:
  • One of the most challenging tasks for any firm, including In Fine Fettle, is determining how much to spend on promotion. Four ba
    9·1 answer
  • Becoming the candy lady tips for advertising and employing
    14·1 answer
  • In your opinion how have human rights changed from the industrial revolution till the modern economy of today
    9·1 answer
  • On January 1, 2015, Tropical Paradise borrows $50,000 by agreeing to a 6%, six-year note with the bank. The funds will be used t
    11·1 answer
  • Identify each of the following accounts as a component of asset (A), liabilities (L), or equity (E). Account Balance sheet secti
    9·1 answer
  • a semiannual interest of 3.5%. Any money he invests would have to be left in the fund for at least five years if he wanted to wi
    6·1 answer
  • To attract customers into a store, Safeway advertises its milk at less than cost, hoping that customers will purchase other groc
    6·1 answer
  • Sophamia Company sells five products, as follows. Product A: Price per unit, $100 -- Variable cost per unit, $40 -- 3 machine ho
    5·1 answer
  • The general ledger journal entry in the General Fund to record actual expenditures and reversal of the associated encumbrance wo
    6·1 answer
  • A very useful guide for making investment decisions is: The shorter the payback period, the more profitable the project. Group s
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!