Hi, I kind of need help with my homework. I already have a code but it doesn't seem to work. I'm confused about the parameters I put. I don't know which part I actually messed up. I don't know what else to do. Thank you so much in advance for your help :] [CODE]#include <iostream> #include <string> #include <fstream> using namespace std; //Function Prototypes float gPACalculation(char cGrade); string honorsDistinction(float fGPA); void summaryInformation(float fGPA, string sHonorsDistinction); //Declare Constants const int SENTINEL = 0; int main () { //Declare Variables ifstream inFile; //input file ofstream outFile; //output file char cGrade =' '; …

Member Avatar
Member Avatar
+0 forum 8

Whats up everyone I have a question, but first of all I know how to read a file, write to it and all that good stuff I was wondering how do I manipulate data from one. I want to take this .txt file and compute the gpa by taking the student grade and and number of hours the course is out of the file and doing the math for them. How would I go about doing this I'm kind of stumped. Here is the .txt file. A123456 John Doe Term Fall 2011 CS 411 Object Oriented Programming 3 A CS …

Member Avatar
Member Avatar
+0 forum 2

Ok guys I'm almost done with my GPA program but I hit a snag. everything works fine but when I insert a letter grade the program doesn't read what number it corresponds to and sets double number to zero. Can some please let me know what I'm doing wrong. [CODE]import java.util.Scanner; public class StudentGPA { public static void main (String args[]){ //User inputs the number of classes he/she has Scanner input = new Scanner (System.in); System.out.println("Please enter your number of classes"); int classes; classes = input.nextInt(); String Grade = ""; int totalHours = 0; int totalHoursEarned = 0; int hours; …

Member Avatar
Member Avatar
+0 forum 2

Hey guys I was wondering if I was doing this right or not. I am writing a program that asks for a grade like A, -A, B+, -B, B and so on. each letter grade is equal to a certain number like in a persons GPA, A = 4.0, -A = 3.67, B+ = 3.33. I want the user to enter the letter grades and have the numbers factored into the GPA. I have already written the program and it works when the numbers are entered but how do you save the numbers to the letter grades? Thank you. Things …

Member Avatar
Member Avatar
+0 forum 2

Hey guys I'm new to java and was wondering if I could have a little assistance. I need to have a user input their number of classes, hours for each class and the grade they received after the information is given i need to calculate their GPA. I have gotten everything done and i have my algorithm for the GPA configuration but I hit a snag. After the user inputs their info I have no idea how to combine all the information to calculate the GPA. Could someone please assist me with this. Thank you. (also I can't use arrays …

Member Avatar
Member Avatar
+0 forum 3

im having this problem when i try to add [CODE] m + 1 = k;[/CODE] it says this- *lvalue required as left operand of assignment* in my compiler, please help. dont mind the unfinished code. [CODE]#include <iostream> using namespace std; int main() { double b, m, k; string x; b = 0.0; cout << " GPA calculator " << endl; cout << " Is your gpa weighted? " << endl; cin >> x; while(x == "yes") { cout << " Enter point: " << endl; cin >> m; m + 1 = k; b += k; cout << " Is …

Member Avatar
Member Avatar
+0 forum 3

The End.