Question

In: Computer Science

1-Create a new Visual C# Console App (.NET Framework). Name the solution "GPA Calculation". 2-Zip and...

1-Create a new Visual C# Console App (.NET Framework). Name the solution "GPA Calculation".

2-Zip and Submit your entire project with the solution file

GPA

Ask the user to input their grade percentage (e.g. the use will enter 98 if they had an overall grade of 98% in their course) for their Accounting, Marketing, Economics and MIS courses. Assume each course is worth 3 credit hours. Once you have all of their grades output what letter grade they earned for each course (e.g. Your letter grade for {Accounting/Marketing/whichever one you are outputting} is {A/B/C/D/F}). After you have output all of their letter grades, output their overall GPA for the semester using the formula:

A = 4.00

B = 3.00

C = 2.00

D = 1.00

F = 0.00

GPA = TOTAL POINTS EARNED / TOTAL POINTS ATTEMPTED

***I am really struggling with this program. If someone could help me figure out the simplest way to code it using loops, I would appreciate it. I have posted this question several times and keep getting strange things as a response. The program needs to convert the letter grade to the correlating point (example: A=4.00), then use those points to calculate the GPA and print it as the output. An example of the output should look like this.

"Please enter your grade, in percentage, for Accounting"

"Please enter your grade, in percentage, for Marketing"

"Please enter your grade, in percentage, for Economics"

"Please enter your grade, in percentage, for MIS"

(accept all inputs for the %)

"Your letter grade for Accounting is: "

"Your letter grade for Marketing is: "

"Your letter grade for Economics is: "

"Your letter grade for MIS is: "

(calculate GPA using the formula above)

"Your GPA is: "

Solutions

Expert Solution

Code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GPA_Calculation
{
class Program
{
static void Main(string[] args)
{
double AccountingGrade, MarketingGrade, EconomicsGrade, MISgrade,GPA;
string letterGradeAccounting,letterGradeMarketing, latterGradeEconomics, latterGradeMIS;
double totalPointsEarned = 0;

Console.Write("Please enter your grade, in percentage, for Accounting: ");
AccountingGrade = Convert.ToDouble(Console.ReadLine());
Console.Write("Please enter your grade, in percentage, for Marketing: ");
MarketingGrade = Convert.ToDouble(Console.ReadLine());
Console.Write("Please enter your grade, in percentage, for Economics: ");
EconomicsGrade = Convert.ToDouble(Console.ReadLine());
Console.Write("Please enter your grade, in percentage, for MIS: ");
MISgrade = Convert.ToDouble(Console.ReadLine());

letterGradeAccounting = findLetterGrade(AccountingGrade);
letterGradeMarketing = findLetterGrade(MarketingGrade);
latterGradeEconomics = findLetterGrade(EconomicsGrade);
latterGradeMIS = findLetterGrade(MISgrade);

totalPointsEarned = 3 * findGragePoint(letterGradeAccounting) + 3 * findGragePoint(letterGradeMarketing) + 3 * findGragePoint(latterGradeEconomics) + 3 * findGragePoint(latterGradeMIS);
GPA = totalPointsEarned / 12.0;

Console.WriteLine("\n\nYour letter grade for Accounting is: " + letterGradeAccounting);
Console.WriteLine("Your letter grade for Marketing is: " + letterGradeMarketing);
Console.WriteLine("Your letter grade for Economics is: " + latterGradeEconomics);
Console.WriteLine("Your letter grade for MIS is: " + latterGradeMIS);
Console.WriteLine("Your GPA is: " + GPA);
}
public static string findLetterGrade(double grade)
{
if (grade >= 90.00)
return "A";
else if (grade >= 80.00 && grade <= 89.99)
return "B";
else if (grade >= 70.00 && grade <= 79.99)
return "C";
else if (grade >= 60.00 && grade <= 69.99)
return "D";
return "F";
}
public static int findGragePoint(string latterGrade)
{
if (latterGrade == "A")
return 4;
else if (latterGrade == "B")
return 3;
else if (latterGrade == "C")
return 2;
else if (latterGrade == "D")
return 1;
return 0;
}
}
}

output

If you have any query regarding the code please ask me in the comment i am here for help you. Please do not direct thumbs down just ask if you have any query. And if you like my work then please appreciates with up vote. Thank You.


Related Solutions

1. Make a Console App (.NET Core) in Visual Studio and name it as A1YourFirstnameLastname. 2....
1. Make a Console App (.NET Core) in Visual Studio and name it as A1YourFirstnameLastname. 2. Implement a vehicle rental management system which is capable of doing the following: • View all, available and reserved vehicles. • Reserve vehicle or cancel a reservation. 3. The application must be menu-based app: 1 - View all vehicles 2 - View available vehicles 3 - View reserved vehicles 4 - Reserve a vehicle 5 - Cancel reservation 6 - Exit 4. NOTE: At...
Make a Program in Visual Studio / Console App (.NET Framework) # language Visual Basic You...
Make a Program in Visual Studio / Console App (.NET Framework) # language Visual Basic You will be simulating an ATM machine as much as possible Pretend you have an initial deposit of 1000.00. You will Prompt the user with a Main menu: Enter 1 to deposit Enter 2 to Withdraw Enter 3 to Print Balance Enter 4 to quit When the user enters 1 in the main menu, your program will prompt the user to enter the deposit amount....
Shopping Cart App (C#) Please create a C# Console (.NET Framework) application which reads from the...
Shopping Cart App (C#) Please create a C# Console (.NET Framework) application which reads from the user, the price of items in their shopping "cart". Be sure to tell the user how to stop (or ask them if they want to stop) entering prices. Items can be priced any positive number greater than zero. When the user has entered the prices for all items in their "cart", calculate the subtotal (the sum of all item prices). Next, check if the...
Create a C# .NET Core Console project in Visual Studio. (This is the same kind of...
Create a C# .NET Core Console project in Visual Studio. (This is the same kind of project we have been doing all semester.) Do all of the following in the Program class. You do not need to add any other classes to this project. 2. If it exists, remove the Console.WriteLine(“Hello World!”); line that Visual Studio created in the Program class. 3. At the very top of the Program.cs page you should see using System; On the empty line below...
Create a C# console application (do not create a .NET CORE project) and name the project....
Create a C# console application (do not create a .NET CORE project) and name the project. Generate two random integers, each between 1 and 50, that you will be adding together to test the user's ability to perform the addition operator. Display the numbers in the console, such as:             7 + 22 = ? Once the user provides their answer, check to see if it is correct and if not, tell them sorry, please try again. If their answer...
Create a C# console application (do not create a .NET CORE project) and name the project...
Create a C# console application (do not create a .NET CORE project) and name the project TuitionIncrease. The college charges a full-time student $12,000 in tuition per semester. It has been announced that there will be a tuition increase by 5% each year for the next 7 years. Your application should display the projected semester tuition amount for the next 7 years in the console window in the following format:             The tuition after year 1 will be $12,600. Note:...
Create a C# console application (do not create a .NET CORE project) and name the project...
Create a C# console application (do not create a .NET CORE project) and name the project TimeToBurn. Running on a particular treadmill, you burn 3.9 calories per minute. Ask the user how many calories they wish to burn in this workout session (this is their goal). Once they tell you, output on the console after each minute, how many calories they have burned (e.g. After 1 minute, you have burned 3.9 calories). Keep outputting the total amount of calories they...
Create a console app with C# that uses a while loop to calculate the average of...
Create a console app with C# that uses a while loop to calculate the average of 3 test scores. Input integers, but use the appropriate average data type. Generally, you use a while to do something while a condition is true. You can use a while loop to execute a certain number of times. *While* this is not the best use of the while loop and another loop is generally more appropriate, it follows the pattern below set a counter...
Create a console app c#. Using a List, ask the user to enter all of their...
Create a console app c#. Using a List, ask the user to enter all of their favorite things. Once they are done, randomly pick a value from the list and display it.
In C# using a Console App, create an array that stores 20 integer values. Use the...
In C# using a Console App, create an array that stores 20 integer values. Use the random number generator to select an integer value between 0 and 10. Store the 20 random integers in the array. Once the array has been created: Print the values in the array. Print the values in the array in reverse order. Sort and print the values in the array in ascending order. Sort and print the values in the array in descending order. Count...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT