
use only C# programming language
You invoke a method by its name followed by a pair of brackets and the usual semi-colon
-
Write a method called DisplayPersonalInfo(). This method will display your name, school, program and your favorite course. Call the DisplayPersonalInfo() method from your program Main() method
-
Write a method called CalculateTuition(). This method will prompt the user for the number of courses that she is currently taking and then calculate and display the tuition cost. (cost = number of course * 569.99). Call the CalculateTuition() method two times from the same Main() method as in question 1.
-
Write a method call CalculateAreaOfCircle(). This method will prompt the user for the radius of a circle and then calculate and display the area.[A = πr2].
Call the CalculateAreaOfCircle() method twice from the same Main() method as in question 1. Use Math.Pi for the value of π -
Write a method call CalculateAreaOfTriangle(), that prompts the user for the base and height of a triangle and then calculate and display the area.[ ]
Call the CalculateAreaOfTriangle() method twice from the same Main() method as in question 1. -
Write a method call CalculateSaleCommission(), that prompts the user for his sales figure, and then calculate and display his commission. (commission = 25% of sales in excess of 1000. If sales is equal to or below $1000.00 there is no commission)
Call the CalculateSaleCommission() method three times from the same Main() method as in question 1. -
Write a method call DisplaySineTable(), that prompts the user for a starting value and an step size. The method will calculate and display a table (10 rows) of sine values based on the user input. Use the built-in method Math.Sin() to obtain the sine of an angle. e.g. if the starting value is 0.5 and the step size is 0.03 the method will display the following table:
0.50 0.4794
0.53 0.5055
0.56 0.5311
0.77 0.6961
The numbers in both columns MUST be right aligned. Call the DisplaySineTable() method from the same Main() method as in question 1. -
In a write a method called DisplayMenu() to display the following text on screen:
===========Narendra’s Computer Systems================
| 1. Display Personal Information |
| 2. Calculate Tuition |
| 3. Calculate Area Of A Circle |
| 4. Calculate The Area Of A Triangle |
| 5. Calculate Sales Commission |
| 6. Display Sine Table |
| 0. End program |
| |
======================================================
Enter the number of your choice ->
This will be the procedure for your final examination.
-
Add another method called ShowMenu() to your project. This method will call the method in question 7 continuously until the user presses 0. (You will have to invoke the method in a loop body, read in the user input as well as check the input). You will need to hook up all the methods that you wrote previously i.e. questions 1 to 6. Replace all the code from your Main() method with a single call to the ShowMenu() method
If there are multiple parameters, than they are separated by commas.
-
Write a method called DisplayHorizontalStars(int numberOfStars). This method will output the number of stars horizontally specified by its argument. Call the DisplayHorizontalStars() method three times from your program Main() method, supplying 0, 5 and 10 respectively for the number of stars.
-
Write a method similar to the one above that displays a vertical line of stars.
Call this method three times with arguments 0, 5 and 10 respectively. -
Write a method that accepts an argument of type double. The method will calculate and display the volume of a sphere with radius specified by its argument. [ ].
Call this method from your main three times, with arguments 1, 2, and 10 respectively. The answers are 4.1888, 33.5103 and 4188.7902 respectively.
Use Math.PI for the value of -
Write a method that takes two arguments: a cost price and a two-letter province code. It will calculate and display the selling price. (If province is Ontario a tax of 13% is added to the price, if the province is Quebec a tax of 17% is added to the cost price. There is no tax for the rest of the provinces and territories).
In your main, call this method enough times to fully test it -
Write a method that takes a single argument of type double. The will display a Celsius to Fahrenheit conversion table. The starting temperature is indicated by the argument and it will display 10 lines in increments of 1. [Fahrenheit = 9/5 Celsius + 32].
In your main call this method two times, each time with a different start value. -
Write a method that takes the following arguments: a starting km value of type double, an increment size of type double and the number of lines of type int. The display a kilometer to miles conversion table. [miles = km * 0.621371].
In your main call this method three times, each time with different values.

Step by stepSolved in 3 steps with 4 images

- You invoke a method by its name followed by a pair of brackets and the usual semi-colon, PLEASE USE ONLY C# PROGRAMMING. Write a method called DisplayPersonalInfo(). This method will display your name, school, program and your favorite course. Call the DisplayPersonalInfo() method from your program Main() method Write a method called CalculateTuition(). This method will prompt the user for the number of courses that she is currently taking and then calculate and display the tuition cost. (cost = number of course * 569.99). Call the CalculateTuition() method two times from the same Main() method as in question 1. Write a method call CalculateAreaOfCircle(). This method will prompt the user for the radius of a circle and then calculate and display the area.[A = πr2].Call the CalculateAreaOfCircle() method twice from the same Main() method as in question 1. Use Math.Pi for the value of π Write a method call CalculateAreaOfTriangle(), that prompts the user for the base and height…arrow_forwardC# (Sharp): Using visual studio a). Make a math library with 3 methods with the same name (overload): First method accepts 2 integer parameters and returns the larger number. Second method accepts 3 integer parameters and returns the larger number. Third method accepts 4 integer parameters and returns the larger number. b). Make a console application that will use and test your library methods.arrow_forwardPYTHON CODE Reza Enterprises sells tickets for buses, tours, and other travel services. Because Reza frequently mistypes long ticket numbers, Reza Enterprises has asked his students to write an application that shows if a ticket is invalid. Your application/program tells the ticket agent to enter a six-digit ticket number. Ticket numbers are designed so that if you lose the last digit of the number, then divide by 7, the remainder of the division is exactly the same to the last dropped digit. This process is shown below: Step 1: Enter the ticket number; for example 123454 Step 2: Remove the last digit, leaving 12345 Step 3: Determine the remainder when the ticket number from step 2 is divided by 7. In this case, 12345 divided by 7 leaves a remainder of 4. Step 4: Display a message to the ticket agent indicating whether the ticket number is valid or not. If the ticket number is valid, save the number to a .txt file called “tickets.txt” and continue to loop your program asking…arrow_forward
- Value returning method Write a program to calculate items sale pricearrow_forwardHello, I am having trouble with an assignment in my C# class. All of the answers I've found online are incorrect, so I'm hoping you guys can help me. Instructions Create an application named SalesTransactionDemo that declares several SalesTransaction objects and displays their values and their sum. The SalesTransaction class contains the following fields: *Name - The salesperson's name (as a string)salesAmount - The sales amount ( as a double)commission The commission (as a double)RATE A readonly field that stores the commission rate (as a double). Define a getRate() accessor method that returns the RATE. Include three constructors for the class. One constructor accepts values for the name, sales amount, and rate, and when the sales value is set, the constructor computes the commission as sales value times commission rate.The second constructor accepts a name and sales amount, but sets the commission rate to 0. The third constructor accepts a name and sets all the other fields to 0. An…arrow_forwardC# A(n) __ is a method that is automatically executed when an object is created. Question 3 options: instantiation header declaration constructorarrow_forward
- 9arrow_forwardIn Java, a global variable is declared inside a method and is accessible only in that method. -True -Falsearrow_forwardFor this lab, you will be doing the following in C#: 1) Create a Home form with buttons that when clicked, will open the Account, Email, and eventually the Contact forms. The Account form should be opened in "View" mode. 2) Add code to the Login form so the Account form opens when the user clicks "Create New Account". The Account form should be opened in "Modify" mode. 3) Add code to the Login form that validates the user input before allowing the user the access the Home form. For now, just verify the user enters "user1" and "12345" for the username and password respectively.arrow_forward
- Don't use AI.arrow_forwardA method’s __________ consists of the method’s name and the data type and argument kind (by value, ref, or out) of the method’s parameters, from left to right. a. appearance b. signature c. identifier d. footprintarrow_forwardWrite the following two methods: computeDiameter: This method accepts the radius (r) of a circle, and returns its diameter (2*r; radius = 7.5). Declare all variables used here & initialize radius: Show method call: Write method code here: displayData: This method accepts two arguments: radius & diameter. The output should have appropriate messages on the screen. Show method call: Write method code here:arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





