Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
2.15 LAB: Artwork label (modules)
Define the Artist class in Artist.py with a constructor to initialize an artist's information. The constructor should by default initialize the artist's name to "None" and the years of birth and death to 0.
Define the Artwork class in Artwork.py with a constructor to initialize an artwork's information. The constructor should by default initialize the title to "None", the year created to 0, and the artist to use the Artist default constructor parameter values. Add an import statement to import the Artist class.
Add import statements to main.py to import the Artist and Artwork classes.
Ex: If the input is:
Pablo Picasso 1881 1973 Three Musicians 1921the output is:
Artist: Pablo Picasso (1881-1973) Title: Three Musicians, 1921If the input is:
Brice Marden 1938 -1 Distant Muses 2000the output is:
Artist: Brice Marden, born 1938 Title: Distant Muses, 2000Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images
Knowledge Booster
Similar questions
- May I please have your assistance with this lab: 2.15 LAB: Artwork label ( modules) Part of the code is correct. I am only needing the code to be correct for the following errors: This is the current code & errors at bottom of code: # Artist.py class Artist: # below is the comstructor to initializez artist infomration # constructor initialize the artist's name to "None" and the years of birth and death to 0 def __init__(self, name='None', birth_year=0, death_year=0): self.name = name self.birth_year = birth_year self.death_year = death_year def print_info(self): if self.birth_year >= 0 and self.death_year >= 0: print(f'Artist: {self.name} ({self.birth_year} to {self.death_year})') elif self.birth_year >= 0: print(f'Artist: {self.name} ({self.birth_year} - present)') else: print(f'Artist: {self.name} (unkown)') # Artwork.py class Artwork:…arrow_forward18arrow_forward7. When a class contains objects of another class, the relationship is called a whole-part relationship or composition. The relationship created is also called a has-a relationship. Discuss some of the possible issues with composition, such as the long statement: Outputsales.getHighestPaidEmployee().getHireDate().getYear().arrow_forward
- 6 Javaarrow_forwardMultitasking makes it simple for you to flip between the several applications you have open. Is it possible to run several operating systems on the same computer? That begs the question: yes or no? What alternatives are there for you to consider in the event that this is the case?arrow_forwardTimer Class Concepts tested: Classes 1) Write a class called Timer that models a stopwatch with start, stop, and reset buttons. It has the following members: a) -int startTime; // variable tracking when the timer was started (unused when timer is not running). In number of seconds since 1970 b) -int timeOnClock; // variable tracking the time on the clock since last reset in seconds c) -bool isRunning; //variable tracking wether the clock is running or stopped d) +Timer(); //constructor, initializes all to zero/false e) +Timer(bool startNow); // constructur that starts clock automatically if startNow is true f) +int getTime(); // returns time on clock in seconds. If clock is running, this must also include the time since it was last started g) +void addTimeToClock(int seconds); // allows manually adding time to the clock h) +void reset(); // resets time on clock to zero i) +void start(); // starts clock j) +void stop(); // stops clock k)…arrow_forward
- Number 24arrow_forwardClass Connect6State Cloneable Connect6State - A representation of a Connect6 game state. We assume a square grid board size specified to be a positive integer less than or equal to 26. Size 19 is common. The first and second players place pieces on the board that are black and white, respectively. Each piece is placed in an unoccupied grid position. On the first turn, the first player places one piece. Afterwards, players alternate placing two pieces per turn. Play continues until either one player completes a consecutive line of 6 or more of their pieces or no play is possible. The player with 6 or more pieces in a horizontal, vertical, or diagonal line is the winner. If no legal play is possible, the game is a draw Field Detail BLACK public static final int BLACK a constant indicating a black player/piece See Also:Constant Field Values WHITE public static final int WHITE a constant indicating a white player/piece See Also:Constant Field Values NONE public static final…arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education