Question
Using C# Create a class called Artist that contains 4 pieces of information as instance variables: name (datatype string), specialization i.e., music, pottery, literature, paintings
Using C#
Create a class called Artist that contains 4 pieces of information as instance variables: name (datatype string), specialization i.e., music, pottery, literature, paintings (datatype string), number of art items (datatype int), country of birth (datatype string).
Create a constructor that initializes the 4 instance variables. The Artist class must contain a property for each instance variable with get and set accessors. The property for number should verify that the Artist contributions is greater than zero. If a negative value is passed in, the set accessor should set the Artists number to 0.
Create a second class ArtistTest that creates two Artist objects using the constructor that you developed in the Artist class. Display the name, specialization, number of art items, country of birth. Your assignment submission must include
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started