// ProjectOne.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include<cstdio>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
class TV
{
public:
char a[10];
int high;
private:
char b[10];
int wide;
};
class Coordinate
{
public://用户可以看到
int x;
int y;
void printX()
{
cout << x << endl;
}
void printY()
{
cout << y << endl;
}
};
class Student
{
public:
void setName(string _name)
{
m_strName = _name;
}
string getName()
{
return m_strName;
}
void setGender(string _gender)
{
m_strGender = _gender;
}
string getGender()
{
return m_strGender;
}
int getScore()
{
return m_iScore;
}
void initScore()
{
m_iScore = 0;
}
void study(int _score)
{
m_iScore += _score;
}
private:
string m_strName;
string m_strGender;
int m_iScore;
};
int main()
{
Student stu;
stu.initScore();
string a = "张三", b = "女";
stu.setName(a);
stu.setGender(b);
stu.study(5);
stu.study(5);
cout<< stu.getName() << ' ' << stu.getGender()
<< stu.getScore();
return 0;
}