need urgent help in project plz plz

Write your question here.
Write TWO CLASSES that help a professor with grading tasks.
The first Class takes information about a test, assignment or exam and save them in a data file. The Class should ask
(a). Course Name,
(b) assignment/test/exam title such as Assignment I or Midterm Exam,
(c) number of students in the class,
(d) each student's name and score on the assignment/test/exam, and
(e) the file name for the data to be saved to.
The second Class takes exam data from a class specified by the user and calculate the class average for that particular test/exam/assignment
Hello, thank you for providing all necessary info to solve the problem. It should be quite easy for us now. From my side, I can give you some tips on how to write first of the classes. The other one follows similar pattern, so you should manage to handle it yourself.

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
// This is ClassName.h header file - a declaration of ClassName class.

// You start with list of necesary includes 
// from libraries (in <>) and your own classes (in "")
#include <necesaryLib1>
#include <necesaryLib2>
#include "DifferentClass.h"

// Then follow with class keyword and it's name. 
// Some conventions dictate the class name to start with Capital Letter
// though it is not a requirement.
class ClassName
// Next line is traditionally an opening curly brace
{ 
    // Following lines are usually indented by one tab mark (or four spaces)
    // They are ended with semicolon.
    // Now use public keyword and put your public members
    public:
    // Each member has a type, and a name. 
    // The same convention I mentioned before dictates that
    // member names begin with lowercase
    // Normally, you would begin with static members, if any:
    static int staticMember;
    int memberOne;
    int memberTwo;
    double memberThree;
    // members can be of other class types
    DifferentClass memberFour;

    // After specifying members, you conventionally would go to present 
    // member functions or methods.
    // Again - by convention, start with public contructor 
    // or static functions if any
    // 0 paratameter contructor, if needed
    static void staticMemberFunction();
    ClassName();
    // Multiparameter constructor may follow
    ClassName(int arg1, int arg2);

    // Next usually go the other member functions.
    // Start with return type, then name then argument list
    // by that same convention - lowercase names
    int memberFunction ();
    double memberFunction2(int arg);

    // Once all public member fields and functions are listed
    // Proceed to protected fields and methods, then private
    protected:
    int protectedMember;
    int protectedFunction();
    private:
    int privateMember();
    int privateFunction();

    // When it is done, close the brace. The class is declared
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// This is ClassName.cpp file
// It contains definition of functions included in ClassName.h
#include "ClassName.h"
// Define each function including constructors:
ClassName::ClassName()
{
    // body of first constructor
}
ClassName:ClassName(int arg1, int arg2)
{
    // body of second constructor
}
void ClassName::staticMemberFunction() 
{
    // body of staticMemberFunction
}
int ClassName::memberFunction()
{
   // body of member function
}
/*
    other definitions follow
*/

I guess it's all there is to it. Having read that, doing your own homework should be piece of cake.

Topic archived. No new replies allowed.