Write a consoleapp in C#
Question Description
I need to write a C# program in Visual Studio that lets a user input a set of positive numbers. The program should display a result that shows the number of valid numbers entered, the largest number and the smallest number.
Your program should be implemented using two classes.
- The class named Numbers: Implement class as depicted in the class diagram. The method readNumbers should read the numbers repeatedly from the user, until they decide to stop. You have to use a while loop for this part. After the user is done entering numbers, the result should be displayed.
- Write a test class for that uses class Numbers. Use this class to demonstrate that your program works. This is a sample output for the program:Entera positive number (or negative number to quit): 54Entera positive number (or negative number to quit): 2Entera positive number (or negative number to quit): 8Entera positive number (or negative number to quit): 3Entera positive number (or negative number to quit): 9Entera positive number (or negative number to quit): 1Entera positive number (or negative number to quit): -1RESULTNumbersentered: 6Largestnumber: 54Smallestnumber: 1
Get your college paper done by experts
Do my question How much will it cost?Place an order in 3 easy steps. Takes less than 5 mins.
Leave a Reply
Want to join the discussion?Feel free to contribute!