📄 studentrec.h
字号:
//ECE106 Lab#5//Name: Mo Li//Student#: 995447379//Date:Mar.09,2007#ifndef _STUDENTREC_H#define _STUDENTREC_H#include <string>using std::string;#define NUM_OF_MARKS 5 // indexed 0-4class studentRecord {private: unsigned int studentNumber; string _firstName; string _lastName; unsigned int marks[NUM_OF_MARKS];public: // the default constructor studentRecord(); // the destructor ~studentRecord(); // sets the student number of the record to studentNum. void setStudentNumber(unsigned int studentNum); // sets the student first name to firstName. void setFirstName(const string & firstName); // sets the student last name to lastName. void setLastName(const string & lastName); // sets the mark at index "index" of the student record to mark. // the method assumes the index is in 0-4 range, and // the mark is in 0-100 range. void setMark(int index, unsigned int mark); // returns the student number. unsigned int getStudentNumber() const; // returns the first name of the student record. string getFirstName() const; // returns the last name of the student record. string getLastName() const; // returns the mark at index "index" of the student record. // it assumes the index is in 0-4 range. unsigned int getMark(int index) const; // prints the student record to the standard output in the format // specified in the assignment specifications. void print() const;}; //studentRecord#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -