Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

the output is: Artist: Banksy (unknown ) Title: Balloon Girl, 2002 464730.3214874.qx32qy7 LAB 0 / 10 ACTIVITY 7.24.1: LAB: Artwork label (classes/constructors) File is marked

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed
the output is: Artist: Banksy (unknown ) Title: Balloon Girl, 2002 464730.3214874.qx32qy7 LAB 0 / 10 ACTIVITY 7.24.1: LAB: Artwork label (classes/constructors) File is marked as read only Current file: main.cpp H #include "Artist.h" 2 #include "Artwork.h" #include #include 5 using namespace std; 7 int main ( ) { 8 string userTitle, userArtistName; 9 int yearCreated, userBirthYear, userDeathYear; 10 11 getline(cin, userArtistName ) ; | 12 getline(cin, userTitle) ; 13 cin >> userBirthYear; 14 cin >> userDeathYear; CS Scar cin >: yearCreated; Scanner 17 Artist userArtist = Artist (userArtistName, userBirthYear, userDeathYear ) ; 18-1 -1 2002 the output is: Artist: Banksy (unknown) Title: Balloon Girl, 2002 464730 3214874.qx8zay7 LAB 7.24.1: LAB: Artwork label (classes/constructors) 0 / 10 ACTIVITY File is marked as read only Current file: main.cpp 5 using namespace std; 7 int main( ) { 8 string userTitle, userArtistName; int yearCreated, userBirthYear, userDeathYear; 10 11 getline(cin, userArtistName ) ; | 12 getline(cin, userTitle) ; 13 cin >> userBirthYear; 14 cin >> userDeathYear ; 15 cin >> yearcreated; 16 17 Artist userArtist = Artist (userArtistName, userBirthYear, userDeathYear ); 18 19 Artwork newArtwork - Artwork (userTitle, yearCreated, userArtist) ; CS rewA twork. rutInfo( ): nscanner 22 32002 the output is: Artist: Banksy (unknown) Title: Balloon Girl, 2002 464790.3214874 qxazay7 LAB ACTIVITY 7.24.1: LAB: Artwork label (classes/constructors) 0 / 10 Current file: Artist.h Load default template... 5 using namespace std; 6 7 class Artist{ 8 public: 9 Artist ( ) ; 10 11 Artist (string artistName, int birthYear, int deathYear) ; 12 13 string GetName( ) const ; 14 15 int GetBirthYear ( ) const ; 16 17 int GetDeathYear( ) const; 18 19 void PrintInfo( ) const; CS $7%et TOLL: clare private dula members . artistName, birthYear, deathyear 232002 the output is: Artist: Banksy ( unknown) Title: Balloon Girl, 2002 464730 8214874 qx3zay7 LAB 7.24.1: LAB: Artwork label (classes/constructors) 0 / 10 ACTIVITY Current file: Artist. cpp Load default template... 1 #include "Artist.h" 2 #include 3 #include 4 using namespace std; 5 6 / / TODO: Define default constructor 7 8 // TODO: Define second constructor to initialize 9 1/ private fields (artistName, birthYear, deathYear) 10 11 // TODO: Define get functions: GetName( ), GetBirthYear(), GetDeathYear( ) 12 13 // TODO: Define PrintInfo( ) function 14 1/ If deathYear is entered as -1. only print birthyear] CS Scan to with CamScannerBanksy Balloon Girl -1 - 1 2002 the output is: Artist: Banksy (unknown ) Title: Balloon Girl, 2002 464730.3214874-qx3zay? LAB ACTIVITY 7.24.1: LAB: Artwork label (classes/constructors) 0 / 10 Current file: Artwork.h - Load default template... 1 #ifndef ARTWORKH #define ARTWORKH DAWN #include "Artist.h" 6 class Artwork{ 7 public: 8 Artwork( ) ; 9 10 Artwork (string title, int yearCreated, Artist artist); 11 12 string GetTitle( ) ; 13 14 int GetYearCreated( ) ; CS Scannerin:thi (); 18 private:2000 the output is: Artist: Brice Marden (1938 to present ) Title: Distant Muses, 2000 Ex: If the input is: Banksy Balloon Girl -1 - 1 2002 the output is: Artist: Banksy (unknown) Title: Balloon Girl, 2002 464730.321487 4.qx3zay7 LAB 0 / 10 ACTIVITY 7.24.1: LAB: Artwork label (classes/constructors) Current file: Artwork.h - Load default template... Artwork( ) ; 10 Artwork(string title, int yearCreated, Artist artist) ; 11 12 string GetTitle( ) ; 13 14 int GetYearCreated( ) ; 15 16 void PrintInfo( ) ; cs Scanhe privat: 19 // 10DO: Declare private uata members - title, yearcreated 20 21 // TODO: Declare private data member artist of type Artist 22Ex: If the input is: Banksy Balloon Girl -1 -1 2002 the output is: Artist: Banksy (unknown) Title: Balloon Girl, 2002 464730.3214874 qx329y7 LAB ACTIVITY 7.24.1: LAB: Artwork label (classes/constructors) 0 / 10 Current file: Artwork.cpp Load default template... #include "Artwork.h" #include 4 / / TODO: Define default constructor 5 6 // TODO: Define second constructor to initialize 7 1/ private fields (title, yearcreated, artist) 8 9 / / TODO: Define get functions; GetTitle( ), GetYearcreated( ) 10 11 / / TODO: Define PrintInfo( ) function 12 // Call the PrintInfo( ) function in the Artist class to print an artist's information CS Scanned w Scanner

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

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions