output: Jimmy took the Midterm Exam and got 79.5 points.   The Main() method for this program should: call Method #1 to output the generic greeting ask the user to enter a name, assignment, and grade and pass them to Method #2 for output. Input should only be done in the Main() method and output in the programmer-defined methods.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter7: Using Methods
Section: Chapter Questions
Problem 7RQ
icon
Related questions
Question

In C#, how would you write (2) programmer defined methods as described below:

 

  • Method #1 (GreetingGeneric) — a type void programmer defined method does not require any parameters. It should output a generic greeting line for a letter. For example: "Dear Customer", "Dear Student", etc.
  • Method #2 (GradeMessage) — a type void programmer defined method that has (3) parameters;
    • (string, string, double) for (name, assignment, and grade) and should output the passed parameters in sentence format: GradeMessage("Jimmy", "Midterm Exam", 79.5) would output: Jimmy took the Midterm Exam and got 79.5 points.

 

The Main() method for this program should:

  1. call Method #1 to output the generic greeting
  2. ask the user to enter a name, assignment, and grade and pass them to Method #2 for output.

Input should only be done in the Main() method and output in the programmer-defined methods.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 6 steps with 2 images

Blurred answer
Knowledge Booster
Function Calling
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage