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....
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 Visual Studio console project named exercise101. The main() function should prompt for the name...
Create a Visual Studio console project named exercise101. The main() function should prompt for the name of a text file located in the same directory as exercise101.cpp, and search for a word in the text file as follows: Enter text file name: Enter search word: The program should print the number of occurrences of the word in the file: occurrences of were found in If the file could not be opened then display: File not found Use Stream file I/O...
Needs to be written in C# Console App! Create a base class BankAccount. Decide what characteristics...
Needs to be written in C# Console App! Create a base class BankAccount. Decide what characteristics are common for checking and saving accounts and include these characteristics in the base class. Define derived classes for checking and savings. In your design , do not allow the banking base account to be instantiated --only the checking and saving classes. Use a Program class to test your design.
Create a Visual Studio console project (c++) containing a main() program that declares a const int...
Create a Visual Studio console project (c++) containing a main() program that declares a const int NUM_VALUES denoting the array size. Then declare an int array with NUM_VALUES entries. Using a for loop, prompt for the values that are stored in the array as follows: "Enter NUM_VALUES integers separated by blanks:" , where NUM_VALUES is replaced with the array size. Then use another for loop to print the array entries in reverse order separated by blanks on a single line...
Create a new Visual Studio console project named assignment042, and translate the algorithm you developed in...
Create a new Visual Studio console project named assignment042, and translate the algorithm you developed in Assignment 04.1 to C++ code inside the main() function. Your program should prompt for a single 9-digit routing number without spaces between digits as follows: Enter a 9-digit routing number without any spaces: The program should output one of: Routing number is valid Routing number is invalid A C++ loop and integer array could be used to extract the routing number's 9 digits. However...
1. Create a NodeJS application having name student (1 Point) 2. Use expressJS framework to create...
1. Create a NodeJS application having name student (1 Point) 2. Use expressJS framework to create REST API to perform given task. (1 Point) 3. Read the given users.json file and return the requested details by client. A. Endpoint /user?uid=? (4 Points) Return JSON response having following fields { "id": 1, "name": "john smith", "email": "[email protected]", "address": "street name, city, zipcode", "phone": "1-770-736-8031" } If no user id found, then return { "message": "No user found" } B. Endpoint /users/all...
Create a Visual Studio console project using c++ void lowerToUpper(std::string & sentence) that iterates over all...
Create a Visual Studio console project using c++ void lowerToUpper(std::string & sentence) that iterates over all characters in the sentence argument. Any lowercase letter should be converted to uppercase. This can be done by including <cctype> and testing each character in sentence with the islower() function. If islower(sentence[i]) returns true then sentence[i] should be replaced with toupper(sentence[i]). The main() function should assign "Hello how are you doing?" to sentence, call lowerToUpper(sentence), and use an if statement to check the new...
Write the code in Java: 1. Create a method that displays your name in the console....
Write the code in Java: 1. Create a method that displays your name in the console. This method is void and takes no parameters. Make an app that runs the method in response to a button press. 2. Create a version of the method in #1 that takes the text (String) to be displayed as a parameter. Allow the user to enter the text in a dialog box or text field and display that text in the console. Be sure...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT