cppHomework/Item.h

32 lines
712 B
C
Raw Normal View History

2023-09-02 07:36:45 +00:00
#pragma once
#include<algorithm>
#include<fstream>
#include<iomanip>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
using namespace std;
class Item {
public:
Item(long long int studentNo, double inscore[]);
Item(ifstream& csv, int stuNoColumn, int scoreColumn[]);
Item();
bool operator>(const Item& i) const;
bool operator<(const Item& i) const;
long long int getStuNo() const;
bool stuNoEqual(const Item& i) const;
static void dspHeader();
static void dspHeader(int w);
void dsp() const;
void dsp(int w) const;
static void toCsvHeader(ofstream& csv);
void toCsv(ofstream& csv) const;
virtual ~Item() {}
private:
long long int studentNo;
double score[9];
double sum;
};