Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

KO POMOGNE DOBIJA NAGRADU.....TREBA MI HITNO!!!

[es] :: C/C++ programiranje :: KO POMOGNE DOBIJA NAGRADU.....TREBA MI HITNO!!!

[ Pregleda: 2821 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

01011011

Član broj: 561
Poruke: 2341
*.ipt.aol.com



+2 Profil

icon KO POMOGNE DOBIJA NAGRADU.....TREBA MI HITNO!!!07.12.2001. u 06:48 - pre 248 meseci
POZDRAV...POTREBAN MI JE OVAJ CODE HITNO...DA BIH PROSAO NA ISPITU IZ VISUAL C++...NISAM PRATIO NEKOLIKO ZADNJIH SEDMICA, I TAKO DA SAM ZAOSTAO...

EVO PROBLEMA DOLE....

NA ENGLESKOM E JEZIKU TAKO DA AKO NEKO NE ZNA ENGLSKI DA MI SE OBRATI...SLEDI NAGRADA ZA ONOGA KOJI MI URADI PROGRAM...



PRVI DIO (STA TREBA DA SE URADI)

Final Exam Part II – Programming Problem

This program is to be submitted in class the day of the final exam. It is worth 50% of the
final. You are to read in student data from a file and create a report file sorted by grades.
The program will also report the course, and section(s) to the screen with the average
score and curved grade along with their corresponding letter grades. Follow the instructions
contained in this file.

You must use the following elements in your program.

struct recordType: This struct will need to contain the following members: first, last, course, section,
finalScore, possiblePoints, finalGrade, curvedGrade, letterGrade.

Functions:
int getClass( ifstream &in, recordType s[], int size): This function will read in an array of structs
and return the number of records read. It will
also calulate the grade as it reads the records: grade = score / possible points.

void printClass( ofstream &out, recordType s[], int size): This function prints an array of structs.

int findHighScore( recordType s[], int size ): This function will return the high score in the array.

void curveGrades( recordType s[], int size ): This function will curve the grades based on the high
score: curved grade = score / highscore * 100.

void sortByGrades( recordType s[], int size ): This function will sort an array of records by grade.

float findAverageGrade( recordType s[], int size ): This function will calculate and return the
average grade for the array of records.

float findAverageCurvedGrade( recordType s[], int size ): This function will calculate and return the average curved grade for the array of records.

char getLetterGrade( int nGrade ): This function will convert a numeric grade into the
corresponding letter grade using a switch statement.

Identifiers:
SIZE: The size of the record array.
studentRecords[]: The record array for the class.
aveGrade, aveCurvedGrade: The average score and grade.
classSize: The number of records in the array.

classData: The input file alias
gradeReport: The output file alias

class5152.txt: The name of the data file.
report.txt: The name of the output file.


evo sad sam promjenio...

Znaci to treba da napravim....

OUTPUT, I POTREBNI CLAS5152.txt fajl za program sam uploadovao na forum....
Molim vas ko moze pomoci bilo kako ako ne moze neko uraditi program,....ko zna da uradi program, sledi nagrada...

Prikačeni fajlovi
 
Odgovor na temu

01011011

Član broj: 561
Poruke: 2341
*.ipt.aol.com



+2 Profil

icon Re: KO POMOGNE DOBIJA NAGRADU.....TREBA MI HITNO!!!07.12.2001. u 20:28 - pre 248 meseci
A EVO I PRIMERA... U SLEDECOM FORUMU DOLE FAJL ZA SKINUTI..
Prikačeni fajlovi
 
Odgovor na temu

ouros
Seattle, WA

Član broj: 342
Poruke: 275
*.lsanca1.dsl-verizon.net

ICQ: 83493423


Profil

icon Re: KO POMOGNE DOBIJA NAGRADU.....TREBA MI HITNO!!!07.12.2001. u 20:44 - pre 248 meseci
Citat:
01011011:
A EVO I PRIMERA... U SLEDECOM FORUMU DOLE FAJL ZA SKINUTI..


Bas si nasao vreme,sad kad svi imaju finals

Srecno ti bilo
Uros
 
Odgovor na temu

01011011

Član broj: 561
Poruke: 2341
*.proxy.aol.com



+2 Profil

icon Re: KO POMOGNE DOBIJA NAGRADU.....TREBA MI HITNO!!!08.12.2001. u 05:21 - pre 248 meseci
MA EVO RADIM GA NEKAKO....ALI NE IDE U PM, JER SAM PROPUSTIO PREDAVANJA SA ARRAYS, FUNCTIONS(STO JE GLAVNO, AJDE I KOPCAM), ALI RAISE, STRUCTURE DATA FILES. OSTALO....
BRBB..


Pomazi ko zna
 
Odgovor na temu

01011011

Član broj: 561
Poruke: 2341
*.ipt.aol.com



+2 Profil

icon Re: KO POMOGNE DOBIJA NAGRADU.....TREBA MI HITNO!!!13.12.2001. u 08:14 - pre 248 meseci
EVO STA SAM DO SADA URADIO, ALI EN VALJA, AKO NEKO ZNA DA DOVRSI FUNKCIJE, I DA MI PREPRAVI GDE JE GRESKA PUNO BI MI POMOGLO, JER SAM PUKAO AKO TO NE URADIM OPET C++ PO DRUGI PUT...

EVO STA SAM SAD URADIO DO SADA...

PLEASE HELP..................



#include <iostream>
#include <fstream>
#include <string>

int getClass(ifstream &in, recordType s[], int size);
void printClass(ofstream,struct,int);
int findHighScore(struct,int);
void curveGrades(struct,int);
void sortByGrades(struct,int);
float findAverageGrade(struct,int);
float findAverageCurvedGrade(struct,int);
char getLetterGrade(int);

using namespace std;


struct recordType
{
string firstName;
string lastName;
string course;
int finalScore;
int possiblePoints;
int finalGrade;
int curveGrade;
char letterGrade;
};//end recordType

int main()
{
int n=0;
int size;
recordType studentRecord[];//create identifier
float aveGrade[];//has identifier
int aveCurveGrade[];
int classSize;
int findHighScore;
ifstream classData;
ofstream gradeReport;
classData.open("classData");//opening the file

return 0;
};
/*********************************************************/
recordType getRecordtype(ifstream &inFile)
{
recordType sRecord;
char bogus;

inFile>>studentRecord.firstName>>studentRecord.lastName>>studentRecord.course>>studentRecord.finalScore>>

studentRecord.possiblePoints>>studentRecord.finalGrade>>studentRecord.curveGrade>>studentRecord.letterGrade;
//this is passing the student record to student in parameter of class size.
classSize=getClass(classData, studentRecord, Size)
n++;
return sRecord;
}

/*****************************************************/
int getClass(ifstream &in, recordType s[], int size){
int n=0, i=0;
in>>s.lastName; // priming read
while( in ){
in>>s.firstName>>s.course>>s.finalScore>>s.possiblePoints;
i++;
n++;
in>>s.lastName;
} // end input for loop
return n;
}//end getClass()
/*****************************************************/
void sortByGrade(recordType, s[], Size)
{
int holdElement;
for(int i=0; i<Size-1; i++)
{
if(s.finalGrade<s[i+1].finalGrade)
{
recordType TempRec;
TempRec = s;//temporary stores record
s=s[i+1];//stors s[i+1] into s
s[i+1]=TempRec;//swap is complete
s.finalGrade = s.finalGrade+1;
s[i+1]=holdElement;
}
}
};//end swapping

/********************************************************/
int findHighScore(recordType s[], int Size)
{
findHighScore;
return findHighScores;
};


OVO NE VALJA JER JE OVAJ ARRAY [ i ] USB prepoznao kao italic letters...ali evo i fajla koji sam stavio...
Prikačeni fajlovi
 
Odgovor na temu

[es] :: C/C++ programiranje :: KO POMOGNE DOBIJA NAGRADU.....TREBA MI HITNO!!!

[ Pregleda: 2821 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.