
January 8th, 2013, 06:52 AM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 1
Time spent in forums: 7 m 48 sec
Reputation Power: 0
|
|
|
General - Help me with my c++ project please
Hi guys, I have been given 3 days to come up with a project and unfortunately I do not know enough to complete it in time so I need help and I need help fast.Fast as in tomorrow the latest(9 jan 2013)
It is a program should provide a menu( which I have completed by myself already).
*requirements are
-manage 2 kinds of students with corresponding info for undergrad & post grad.,(base class & derived classes).
undergrad=stdnt number,name,age,sex,grade,speciality,average score
postgrad=stdnt number,name,sex,age,grade,speciality,tutor,researc h area.
The menu I have created is a guideline as to what the program should be able to do.
below is the source code of what I have done so far;
[COLOR=DarkRed]#include <iostream>
#include <string>
#include<windows.h>
using namespace std;
class progMenu{
private:
string I;
string O;
string F;
string D;
string U;
string E;
public:
void menu();
void swtchboard();
void exitingOption();
};
void progMenu::menu()
{
string I="Insert student information\n";
string O="Output all students\n";
string F="Find student(s)\n";
string D="Delete student(s)\n";
string U="Update student information\n";
string E="Exit\n";
cout<<"***********************WELCOME MENU***********************\n"<<endl;
cout<<"PLEASE CHOOSE AN OPTION AND PRESS ENTER.\n\n"<<endl;
cout<<"I: "<<I<<"\nO: "<<O<<"\nF: "<<F<<"\nD: "<<D<<"\nU: "<<U<<"\nE: "<<E<<"\n"<<endl;
cout<<"***********************WELCOME MENU***********************\n"<<endl;
cout<<"PLEASE CHOOSE AN OPTION AND PRESS ENTER.\n"<<endl;
};
void progMenu::swtchboard()
{ char o;
cin>>o;
switch(o)
{
case 'I':
case 'i':
cout<<"still working Insert information"<<endl;
break;
case 'O':
case 'o':
cout<<"still working on Output all students"<<endl;
break;
case 'F':
case 'f':
cout<<"still working on Find student"<<endl;
break;
case 'D':
case 'd':
cout<<"still working on Delete student"<<endl;
break;
case 'U':
case 'u':
cout<<"still working on Update student "<<endl;
break;
case 'E':
case 'e':
exitingOption();
break;
};
};
void progMenu::exitingOption()
{
Sleep(2000);
cout<<"program is exiting...\n"<<endl;
Sleep(2000);
};
int main(){
progMenu start;
start.menu();
start.swtchboard();
system("pause");
return 0;
};
|