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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!