cpp00...
This commit is contained in:
68
ex01/Contact/Contact.cpp
Normal file
68
ex01/Contact/Contact.cpp
Normal file
@@ -0,0 +1,68 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* Contact.cpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/09/04 00:27:59 by aortigos #+# #+# */
|
||||
/* Updated: 2025/09/05 16:16:35 by aortigos ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "Contact.hpp"
|
||||
|
||||
Contact::Contact()
|
||||
{
|
||||
this->name = "NULL";
|
||||
}
|
||||
|
||||
std::string Contact::getName()
|
||||
{
|
||||
return (this->name);
|
||||
}
|
||||
|
||||
std::string Contact::getSurname()
|
||||
{
|
||||
return (this->surname);
|
||||
}
|
||||
|
||||
std::string Contact::getNickname()
|
||||
{
|
||||
return (this->nickname);
|
||||
}
|
||||
|
||||
std::string Contact::getPhoneNumber()
|
||||
{
|
||||
return (this->phoneNumber);
|
||||
}
|
||||
|
||||
std::string Contact::getSecret()
|
||||
{
|
||||
return (this->secret);
|
||||
}
|
||||
|
||||
void Contact::setName(std::string str)
|
||||
{
|
||||
this->name = str;
|
||||
}
|
||||
|
||||
void Contact::setSurname(std::string str)
|
||||
{
|
||||
this->surname = str;
|
||||
}
|
||||
|
||||
void Contact::setNickname(std::string str)
|
||||
{
|
||||
this->nickname = str;
|
||||
}
|
||||
|
||||
void Contact::setPhoneNumber(std::string str)
|
||||
{
|
||||
this->phoneNumber = str;
|
||||
}
|
||||
|
||||
void Contact::setSecret(std::string str)
|
||||
{
|
||||
this->secret = str;
|
||||
}
|
||||
43
ex01/Contact/Contact.hpp
Normal file
43
ex01/Contact/Contact.hpp
Normal file
@@ -0,0 +1,43 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* Contact.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/09/02 21:57:21 by aortigos #+# #+# */
|
||||
/* Updated: 2025/09/04 14:02:27 by aortigos ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef CONTACT_HPP
|
||||
|
||||
# define CONTACT_HPP
|
||||
|
||||
# include <iostream>
|
||||
|
||||
class Contact
|
||||
{
|
||||
private:
|
||||
std::string name;
|
||||
std::string surname;
|
||||
std::string nickname;
|
||||
std::string phoneNumber;
|
||||
std::string secret;
|
||||
|
||||
public:
|
||||
Contact();
|
||||
void setName(std::string str);
|
||||
void setSurname(std::string str);
|
||||
void setNickname(std::string str);
|
||||
void setPhoneNumber(std::string str);
|
||||
void setSecret(std::string str);
|
||||
|
||||
std::string getName();
|
||||
std::string getSurname();
|
||||
std::string getNickname();
|
||||
std::string getPhoneNumber();
|
||||
std::string getSecret();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user