Home / Expert Answers / Computer Science / 11-8-lab-artwork-label-modules-define-the-artist-class-in-artist-py-with-a-constructor-to-initia-pa345

(Solved): 11.8 LAB: Artwork label (modules) Define the Artist class in Artist py with a constructor to initia ...




11.8 LAB: Artwork label (modules)
Define the Artist class in Artist py with a constructor to initialize an artists informati
Ex: If the input is:
Brice Marden
1938
\( -1 \)
Distant Muses
2000
the output is:
Artist: Brice Marden (1938 to present)
Titl
output is:
\[
\begin{array}{l}
\text { rtist: Banksy (unknown) } \\
\text { itle: Balloon Girl, } 2002
\end{array}
\]
\begin{
11.8 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 "unknown' and the years of birth and death to - 1 . 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 "unknown", the year created to \( -1 \), 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 \( \mathrm{Art} \) is \( \mathrm{t} \) and Artwork classes. Ex: If the input is: Brice Marden 1938 \( -1 \) Distant Muses 2000 the output is: Artist: Brice Marden (1938 to present) Title: Distant Muses, 2000 Ex: If the input is: Banksy \( -1 \) \( -1 \) Balloon Girl 2002 the output is: Artist: Banksy (unknown) Title: Balloon Gir1, 2002 output is: \[ \begin{array}{l} \text { rtist: Banksy (unknown) } \\ \text { itle: Balloon Girl, } 2002 \end{array} \] \begin{tabular}{l|l} LAB \\ ACriviry & 11.8.1: LAB: Artwork label (modules) \end{tabular} Current file: main.py 1 \# TODO: Import Artist from Artist.py and Artwork from Artwork.py if _name_.. "_-main__": user_artist_name \( = \) input () user_birth_year \( = \) int(input()) user_death_year \( = \) int \( ( \) input ()\( ) \) user_title = input() user_year_created = int(input()) user_artist - Artist(user_artist_name, user_birth_year, user_death_year) new_artwork = Artwork(user_title, user_year_created, user_artist) new_artwork.print_info()]


We have an Answer from Expert

View Expert Answer

Expert Answer


CODE IS AS FOLLOWS >> 3 CLASSES WOULD BE MADE BY US >> 1. MAIN.PY from Artist import * from Artwork import * if __name__ == "__main__": user_artist_na
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe