1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
|
//#include "stdafx.h"
#include <iostream> // I/O operations
#include <iomanip> // Formatting functions
#include <cstdlib> // General use library functions
#include <string> // Defines dynamic string stuff
using namespace std;
int main()
{
//-------- Start of variable and object creation ------
string csid = "XXXX";
string first = "XXXX";
string last = "XXXX";
string grade1 = "XXXX";
string grade2 = "XXXX";
string grade3 = "XXXX";
string grade4 = "XXXX";
string grade5 = "XXXX";
string grade6 = "XXXX";
double grade1_num = atof(grade1.c_str());
double grade2_num = atof(grade2.c_str());
double grade3_num = atof(grade3.c_str());
double grade4_num = atof(grade4.c_str());
double grade5_num = atof(grade5.c_str());
double grade6_num = atof(grade6.c_str());
double Average = (grade1_num + grade2_num + grade3_num + grade4_num + grade5_num + grade6_num) / 6;
// A variable to throw away the screen transition input
string resp = "XXXX";
//-------- End of variable declarations -----------------------
//-------- Beginning of the Splash Screen -------------------
system("cls"); //Calls to the OS using cls function MS specific
cout << endl << endl << endl << endl; //4 blank lines
cout << " " << endl;
cout << endl << endl;
cout << " " << endl;
cout << endl << endl << endl << endl << endl << endl; // 6 blank lines
cout << " " << endl;
cout << endl << endl << endl << endl << endl << endl << endl << endl;
//-------- End of the Splash Screen --------------------------
//Transition to next screen
cout << " Press <ENTER> to Continue";
getline(cin, resp);
system("cls");
//End of transition
//-------- Start of Input Screen -----------------------------
cout << endl << endl;
cout << " COLLEGE NAME" << endl;
cout << endl;
cout << " STUDENT GRADE TRACKING SYSTEM" << endl;
cout << endl;
cout << " Input Screen" << endl;
cout << endl;
cout << " Enter data as requested and press <ENTER> after each.";
cout << endl << endl;
cout << " Last Name: "; getline(cin, last);
cout << " First Name: "; getline(cin, first);
cout << endl;
cout << " Student ID Number: "; getline(cin, csid);
cout << " Grade 1: "; getline(cin, grade1);
cout << " Grade 2: "; getline(cin, grade2);
cout << " Grade 3: "; getline(cin, grade3);
cout << " Grade 4: "; getline(cin, grade4);
cout << " Grade 5: "; getline(cin, grade5);
cout << " Grade 6: "; getline(cin, grade6);
//-------- End of the Input Screen --------------------------
//Transition to next screen
cout << " Press <ENTER> to Continue";
getline(cin, resp);
system("cls");
//End of transition
//-------- Start of Output Screen -----------------------------
cout << endl << endl;
cout << " COLLEGE NAME" << endl;
cout << endl;
cout << " STUDENT GRADE TRACKING SYSTEM" << endl;
cout << endl;
cout << " Output Screen" << endl;
cout << endl << endl << endl;
cout << " Student Name (First Last): " << first;
cout << " " << last << endl;
cout << " CSID: " << csid << endl;
cout << " Grade 1: " << grade1 << endl;
cout << " Grade 2: " << grade2 << endl;
cout << " Grade 3: " << grade3 << endl;
cout << " Grade 4: " << grade4 << endl;
cout << " Grade 5: " << grade5 << endl;
cout << " Grade 6: " << grade6 << endl;
cout << " Total Grade Average: " << Average << endl;
// Conversions, Decisions and Calculations
//-------- End of the Output Screen --------------------------
//Transition to next screen
cout << " Press <ENTER> to Continue";
getline(cin, resp);
system("cls");
//End of transition
return 0;
}// int main( )
| |