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
10 POINTS NEED HELP Explain why you should search your name online before actively seeking employment.
lyudmila [28]

Answer:

By claiming your web presence, you're protected from other people, with the same name, claiming it before you. You also gain control over how you're perceived online, and thus what employers find out about you when they conduct their search

Explanation:

4 0
3 years ago
Bradley Snapp has deposited $5,291 in a guaranteed investment account with a promised rate of 4% compounded annually. He plans t
Julli [10]

Answer:

i dont realky understand the question

7 0
3 years ago
On August 1, 2009 a company issues bonds with a par value of $600,000. The bonds mature in 10 years, and pay 6% annual interest,
Leya [2.2K]

Answer:

discount on BP   8,000 debit

cash                592,000 debit

bond payable                       600,000 credit

-to record issuance of the bonds--

interest expense     15,416.67 debit

  interest payable                     15,000      credit

  discount on BP                           416.67 credit

--to record year-end adjustment entry--

interest payable   15,000      debit

interest expense   3,083.33 debit

  cash                                       18,000    credit

  Discount on BP                         416.67 credit

-to record first interest payment to bondholders--

Explanation:

proceeds from the bonds:  592,000

face value of the bonds.    (600,000)

discount on BP                        (8,000)

We amortize over the life of the bond in equal parts:

8,000 / 20 payment (10years x 2 payment per year) = 500

interest accrued from August 1st to December 31th:

face value x rate x time accrued

600,000 x 6% x 5/12 = 15,000

accrued proportional amortization

amortizationfor 6 months x accrued month

from Augsut 1st to December 31th

500 x 5/6 = 416.67

February 1st payment:

600,000 x 6% x 1/12 = 3,000 interest expense

cash outlay:

600,000 x 6% x 6/12 = 18,000

amortization 500 - 416.67 = 83.33

8 0
3 years ago
If purchasing power parity​ holds, the price level in Turkey is​ 210, and the nominal exchange rate​ (E) = 0.84 Turkish lira ​=
g100num [7]

Answer:

c. 250

Explanation:

Since; Turkish lira ​= 1 Brazilian​ real

and exchange rate​ (E) = 0.84

Considering that Brazil is the home country

The price level in Turkey = 210

∴ Brazil price level = 210 / 0.84 = 250 real

7 0
3 years ago
About 13 to 16 guests out of every 100 are purposefully out to scam us and get something for free.
antoniya [11.8K]

Answer:

True

Explanation:

2% out of 100 guest purposefully scam.

3 0
4 years ago
Read 2 more answers
Other questions:
  • Val would like to limit the websites that her users visit to those on an approved list of pre-cleared sites. what type of approa
    10·1 answer
  • Which of the following statements is NOT one of the differentiation strategy​ decisions? A. Modular design to aid product differ
    14·2 answers
  • (look at the graph)
    8·1 answer
  • PLEASE HELP!!!
    14·1 answer
  • 1. Suppose that Intel is considering building a new chip-making factory. Assuming that Intel needs to borrow money in the bond m
    7·1 answer
  • John, a product manager, ensures that his team has regular meetings and no team member is absent during the meetings. He also en
    5·1 answer
  • Assume that a currency's spot and future prices are the same, and the currency's interest rate is higher than the U.S. rate. The
    12·1 answer
  • Masters, Inc., has sales of $37,900, costs of $15,000, depreciation expense of $2,400, and interest expense of $1,310. If the ta
    8·1 answer
  • What are the two serious problems of traditionalist account?​
    11·2 answers
  • if a merchandiser records a debit to accounts receivable and a credit to sales revenue, they have most likely
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!