Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Programming Exercise 7-6 Instructions Admission Modulariz... + . Terminal y Previously, you wrote a program named Admission for a college admissions office in which the
Programming Exercise 7-6 Instructions Admission Modulariz... + . Terminal y Previously, you wrote a program named Admission for a college admissions office in which the user enters a numeric high school grade point average and an admission test score. The program displays Accept or Reject based on those values. Now, create a modified program named Admission Modularized in which the grade point average and test score are passed to a method that returns a string containing Accept or Reject. Grading 1 using System; 2 using static System.Console; 3 class Admission 4 { 5 static void Main() 6 { 7 double gpa; 8 int testScore; 9 const double MINGPA = 3.0; 10 const int ADMIN1 - 60, ADMIN2 - 80; 11 string inputString; 12 WriteLine("Enter grade point average "); 13 inputString - ReadLine(); 14 gpa = Convert.ToDouble(inputString); 15 WriteLine("Enter test score "); 16 inputString = ReadLine(); 17 testScore - Convert.ToInt32 (inputString); 18 if(gpa > MINGPA) 19 if(testScore >= ADMIN1) 20 WriteLine("Accept"); 21 else 22 WriteLine("Reject"); 23 else 24 if(testScore >- ADMIN2) 25 WriteLine("Accept"); 26 else 27 WriteLine("Reject"); 28 } 29 public static string AcceptorReject(double gpa, int testScore) 30 { 31 // Write your AcceptorReject method here. 32 33) 34 When you have completed your program, click the Submit button to record your score
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started