Peruttu

Simple C++ Work - Constructors

Most of the code is already there, this is for educational purposes to compare with my own and learn. I do not expect to pay too much as this will be an easy job for you.

I will be providing all the files and instructions very easy for you.

Part of instructions:

Design and code a class named Passenger in the namespace holiday. The class represents passengers for an airline company that go on vacation. Add to the class the following private attributes:

m_name: an array of characters of size 32 (including '\0') that holds the name of the passenger;

m_destination: an array of characters of size 32 (including '\0') that holds the destination where the passenger is travelling;

m_departureYear, m_departureMonth, and m_departureDay: three integers that together represent the date when the passenger goes on vaca-tion;

The class Passenger has the following member function already implemented in [url removed, login to view] (look at this function and make sure you understand its imple-mentation):

void display(bool onlyNames = false) const: a query that displays the contents of a Passenger instance.

Add to the type Passenger the following member functions (and implement them—make sure to reuse existing code instead of duplicating it):

default constructor (a constructor with no parameters): this constructor should set the instance to the safe empty state (the safe empty state is when all numeric attributes are set to zero and the strings are set to the empty string);

constructor with 2 parameters: The first parameter contains the name of the passenger and the second parameter contains the destination of the journey. This constructor should set the m_name attribute to the first parameter, the m_destination attribute to the second parameter, and the departure date to July 1st, 2017. This constructor validates the parameters before accepting them; if the parameters are not valid (any of them), then this function should set the instance to the safe empty state.

- The strings are valid if they are not null and not empty;

bool isEmpty() const: a query that checks if the Passenger instance is in the safe empty state;

bool canTravelWith(const Passenger&) const: a query that checks if two passengers can travel together (two passengers can travel together if they go to the same destination on the same date).

Taidot: C-ohjelmointi, C++ -ohjelmointi

Näytä lisää: work c, freelance work c programming, freelance work c#, 5 dollar work c# freelance, c++ simple, c++ simple program, c simple, c simple program, work home simple typing work, work home simple job, online work jobs simple, work home simple data entry, simple program income tax code cpp, simple jtag tap master implemented cpld, simple photoshop work price, simple programming work, simple flash work

Tietoa työnantajasta:
( 27 arvostelua ) Hamilton, Canada

Projektin tunnus: #13096790

Myönnetty käyttäjälle:

blitz003

Hello. Lets talk about the price. I can do this for you in less than an hour if all things be equal. I can take as low as $5.00 if you're willing to work with me. I just want to help.

20 $ CAD 1 päivässä
(2 arvostelua)
0.2

14 freelanceria on tarjonnut keskimäärin 28 $ tähän työhön

wangbeizou

Hello. How are you. I have read and understood the project. I'm an Expert in Data Structures and Algorithms. And I know well ; Java ,C/C++, Python ,PHP. I'm interested this project. So, firstly I want to discu Lisää

40 $ CAD 1 päivässä
(109 arvostelua)
6.0
harshdaga

Hi, I've got quite some experience with C and C++ and I'm sure I can help you out with your project. This won't take more than a couple of hours to finish.

25 $ CAD 1 päivässä
(54 arvostelua)
5.0
61 $ CAD 1 päivässä
(16 arvostelua)
5.1
kostasrim

Hello, my name is Kostas and I am an expert c/c++ developer with an extensive knowledge of algorithms and data structures. Please send me a message to discuss the project details. I can have your project ready by Lisää

25 $ CAD 1 päivässä
(25 arvostelua)
4.3
55 $ CAD 0 päivässä
(10 arvostelua)
4.2
achouriissam

Hello, My name is Achouri Issam. I have over three years experience in Software Engineering and i have a good Knowledge with Java, JavaEE,Android,IOS, Spring, Spring MVC, EJB,Struts2, Hibernate, JSP, Servlet , Lisää

16 $ CAD 1 päivässä
(3 arvostelua)
2.0
30 $ CAD 1 päivässä
(3 arvostelua)
1.3
ahmadshyk

hey i am new here as my profile shows but i am building my reputation and i can do your work as I bid to only those projects which i think i can complete, thanks :)

15 $ CAD 1 päivässä
(2 arvostelua)
0.8
15 $ CAD 1 päivässä
(0 arvostelua)
0.0
CamelCaseAndrew

Can deliver quality code with clear instructions. I also have lots of experience in object oriented software development.

20 $ CAD 1 päivässä
(0 arvostelua)
0.0
Tomi1ce

Hello! I work in C++ and I can develop the required program exactly as you described it. I can also make a mini documentation for the project if you [url removed, login to view] I need 2 days because I have other tasks to do as well. Lisää

25 $ CAD 2 päivässä
(0 arvostelua)
0.0
nikoym

Dear Friend, I'd like to work on this task and I think this is a piece of cake! I'm new to this freelancing site but I'm quite experienced with programming and ecpecially with C++. I look forward to hearing from Lisää

15 $ CAD 1 päivässä
(0 arvostelua)
0.0
Er1cHo

Hi there, I'm an experienced C++ programmer and I like to take this project and we can share what we knew :)

23 $ CAD 1 päivässä
(0 arvostelua)
0.0