Find Jobs
Hire Freelancers

C++ Small Work Classes and Overload

$10-30 CAD

Completed
Posted over 7 years ago

$10-30 CAD

Paid on delivery
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. Summary of work: Design and code a class named Kingdom in the namespace westeros. The class should have two public members: m_name: a statically allocated array of characters of size 32 (including '\0') that holds the name of the kingdom; m_population: an integer that stores the number of people living in the kingdom. Add to the westeros namespace, a function a function called display(...) that returns nothing, receives as a parameter a reference to an object of type Kingdom and prints to the screen the parameter in the following format: KINGDOM_NAME, population POPULATION<ENDL> Put the class definition and the westeros::display(...) declaration in a header named kingdom.h. Put the implementation of westeros::display(...) in a file named kingdom.cpp. PART 2: Overload the function westeros::display(...) by adding 3 more methods: Overload #1: a function that returns nothing and receives two parameters: the first one is an array of Kingdoms, and the second one is an integer representing the number of elements in the array. This function should calculate the total number of people living in Westeros and print the array to the screen in the following format: ------------------------------<ENDL> Kingdoms of Westeros<ENDL> ------------------------------<ENDL> 1. KINGDOM_NAME, population POPULATION<ENDL> 2. KINGDOM_NAME, population POPULATION<ENDL> 3. KINGDOM_NAME, population POPULATION<ENDL> ------------------------------<ENDL> Total population of Westeros: TOTAL_POPULATION<ENDL> ------------------------------<ENDL> Overload #2: a function that returns nothing and receives three parameters: the first one is an array of Kingdoms, the second one is the number of elements in the array, and the third one is an integer representing the minimum number of people that a kingdom should have in order to be printed on the screen. This function should print to the screen only the kingdoms that have a population bigger or equal to the value specified in the third parameter, in the following format: ------------------------------<ENDL> Kingdoms of Westeros with more than MIN_POPULATION people<ENDL> ------------------------------<ENDL> KINGDOM_NAME, population POPULATION<ENDL> KINGDOM_NAME, population POPULATION<ENDL> ------------------------------<ENDL> Overload #3: a function that returns nothing and receives three parameters: the first one is an array of Kingdoms, the second one is the number of elements in the array, and the third one is the name of a kingdom. If in the array exists a Kingdom with the name specified in the third parameter, this function should print it to the screen in the following format: ------------------------------<ENDL> Searching for kingdom KINGDOM_NAME in Westeros<ENDL> ------------------------------<ENDL> KINGDOM_NAME, population POPULATION<ENDL> ------------------------------<ENDL> If in the array there is no kingdom with the specified name, this function should print to the screen a message in the following format: ------------------------------<ENDL> Searching for kingdom KINGDOM_NAME in Westeros<ENDL> ------------------------------<ENDL> KINGDOM_NAME is not part of Westeros.<ENDL> ------------------------------<ENDL>
Project ID: 12951481

About the project

9 proposals
Remote project
Active 7 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi, I have quite a bit of C++ experience.. Would u like me to finish this off for you? :) Do let me know.
$20 CAD in 1 day
5.0 (12 reviews)
4.9
4.9
9 freelancers are bidding on average $34 CAD for this job
User Avatar
Hi, THANKS FOR THE OPPORTUNITY. Check good reviews from customers I have previously worked for. Its my duty, as I have done here before to deliver on this. Kindly let's start work. I have completed projects in software solutions such as CRMS(Customer Relationship Management Software), lead pages in many known online provided software such as (Zoho, Clickfunnels, Infusionsoft), e-Commerce, Online shops, Payment Integrations such as (Paypal, skrill, Visa, Walletone, GoCardless), Javascript frameworks(Angular JS-This has been used by Domino’s Pizza, Ryanair, iTunes Connect, PayPal Checkout, Google and many companies, React (similar to Flux, Redux), jQuery etc), CSS, PHP(Zend framework, CodeIgnitor, YII, CakePHP,laravel) Java(Servlet API,JavaServer Pages, Apache Struts, Apache Tapestry, Apache Wicket, JavaServer Faces and Facelets, SiteMesh, Spark),Android(PhoneGap,Appcelerator, JQuery Mobile, CoronaSDK, Appbuilder), Ruby, Python(django)).
$29 CAD in 6 days
5.0 (1 review)
1.8
1.8
User Avatar
Hi I am very interested on your project. I can do it in short time as you need. You can see my portfolio and review and believe my capability. I am good at c/c++ programming. Hope for your kind contact. Thank you.
$10 CAD in 1 day
5.0 (1 review)
0.3
0.3
User Avatar
I am expert writer, good designer , engineer and programmer. i am sure i can do your task better than any other person. you will get 100% accurate work before deadline. kindly award me this project. thanks in advance.
$25 CAD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi, this seems simple and we have done work like this before. PM us with a "Hi" and we will give you the project within a few hours.
$25 CAD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi! I'm an expert C++ programmer. I can code what you need and give you some general advice on code style and safety, and answer some questions you might have. I have some experience (and I love) teaching, so this shouldn't be a problem for me at all. As always, since we're on freelancer.com, I only expect to be paid when you ate fully satisfied with my services. Best regards, Cássio Renan
$15 CAD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of CANADA
Hamilton, Canada
5.0
27
Payment method verified
Member since Feb 22, 2016

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.