⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 client.cpp

📁 This assessment requires the creation of three of the core classes of the auction project. Class Dat
💻 CPP
字号:
#include <iostream>
#include <string>
#include <vector>
#include "client.h"

using namespace std;

Client::Client(void)
{

}

Client::Client (string &fname, string &lname, string &email, string &passwd):fname(fname),lname(lname),email(email),passwd(passwd)
{

}

Client::Client(Client const &c):fname(c.fname),lname(c.lname),email(c.email),passwd(c.passwd)
{

}

void Client::setFname(const string& fn)
{
	fname = fn;
}

void Client::setLname(const string& ln)
{
	lname = ln;
}

void Client::setEmail(const string& em)
{
	email = em;
}

void Client::setPasswd(const string& pa)
{
	passwd = pa;
}


string Client::getFname () const
{
	return fname;
}

string Client::getLname () const
{
	return lname;
}

string Client::getEmail () const
{
	return email;
}

string Client::getPasswd () const
{
	return passwd;
}


bool Client::verifyPasswd(string pas)
{
	return (passwd == pas);
}

istream &operator>>(istream &stream, Client &c)
{
	string fn, ln, em, pas;
	stream >> fn >> ln >> em >> pas;

	c.setFname(fn);
	c.setLname(ln);
	c.setEmail(em);
	c.setPasswd(pas);
	return stream;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -