Question: C# with visual studio Create a class called peasant a) The peasant class will have a. a private field called name of type string b.

C# with visual studio

C# with visual studio Create a class called peasant a) The peasant

class will have a. a private field called name of type string

Create a class called peasant a) The peasant class will have a. a private field called name of type string b. a private field called lifetime of type stopwatch c. a private field called eveptocycrence of double d. a private field that will hold the listbox that the peasants outputs will be sent to e. A public property that will set the listbax f. A public property to return the peasant's name g. A public method (or property) that will return the elapsed time, in milliseconds, that the peasant has been alive A constructor that will h. i. take in a name (string) and set the private name field ii. Display in the proper listbex "Peasant has been born into the world" ii. start the lifetime stopwatch iv. randomly set eventOscurceoce to be a value between 0.5 and 2.0 seconds i. A function called livelife. This function will be an asynchronous function (name it properly) This function will have an internal loop that will loop until the lifetime is 15 seconds (while ( iteTine Elapsedu seconds has been born into the world" ii. start the lifetime stopwatch iv. randomly set eventOscurceoce to be a value between 0.5 and 2.0 seconds i. A function called livelife. This function will be an asynchronous function (name it properly) This function will have an internal loop that will loop until the lifetime is 15 seconds (while ( iteTine Elapsedu seconds

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!