Find Jobs
Hire Freelancers

Assignment

$30-250 USD

已完成
已发布超过 9 年前

$30-250 USD

货到付款
Design a Ship class that has the following members: A member variable for the name of the ship ( a string) A member variable for the year that the ship was built ( a string) A constructor and appropriate accessors and mutators Six overloaded relational operators that compare 2 ships. Compare based on the year the ship was built. A virtual print function that displays the ship’s name and the year it was built. Design a Cruise Ship class that is derived from the Ship class. The Cruise Ship class should have the following members: A member variable for the maximum number of passengers ( an int)A constructor and appropriate accessors and mutators A print function that overrides the print function in the base class. The Cruise Ship class’s print function should display only the ship’s name and the maximum number of [login to view URL] a Cargo Ship class that is derived from the Ship class. The Cargo Ship class should have the following members:A member variable for the cargo capacity in tonnage ( an int).A constructor and appropriate accessors and mutators.A print function that overrides the print function in the base class. The Cargo Ship class’s print function should display only the ship’s name and the ship’s cargo capacity. Use the following code in your main function to test your classes: // Create an array of Ship pointers, initialized with // the addresses of some dynamically allocated objects. const int SIZE = 3; Ship *ships[SIZE] = { new Ship( "Lolipop" , 1960), new CruiseShip( "Disney Magic" , 1998, 2400), new CargoShip( "Black Pearl" , 1800, 5000 0) }; int firstShip = 0; int lastShip = 0; // Call each object's print function and check for newest and oldest. for ( int index=0; index < SIZE; index++) { ships[index] - >print(); cout << " ---------------------------- \ n" ; //Use overloaded relational operators if (*ships[index] < *ships[firstShip]) firstShip = index; if (*ships[index] > *ships[lastShip]) lastShip = index; } cout<<endl; cout<< "The oldest ship built was in " << ships[firstShip] - >getYearBuilt() << endl; ships[firstShip] - >print(); cout<< "The newest ship built was in " << ships[lastShip] - >getYearBuilt() << endl; ships[lastShip] - >print(); //free up the memory for ( int index=0; index < SIZE; index++) { delete ships[index]; }
项目 ID: 6206516

关于此项目

14提案
远程项目
活跃10 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
颁发给:
用户头像
Hello there! I am proficient in C++ and I can provide you with the required classes and code in a few hours. I suppose that this is for a course assignment, so if you know which development environment you are using, I might be able to provide you with a project file for that too. Thank you in advance! Best Regards Alex
$34 USD 在1天之内
5.0 (21条评论)
5.2
5.2
14威客以平均价$45 USD来参与此工作竞价
用户头像
Hello I have 20+ years of C++ experience, 10 years as freelancer 300+ projects completed. · I´ll send you a full tested and documented program (in code). · Unlimited cycles of revision in the agreed time period. · Full advice about the best way to do the implementation. Please contact me to discuss the details. Thanks.
$35 USD 在0天之内
4.9 (24条评论)
5.1
5.1
用户头像
Professional C++ programmer with 4 years experience in OOP concepts and object oriented analysis I can deliver this project in the given time with full documentation. please contact me for more information.
$45 USD 在3天之内
5.0 (8条评论)
3.5
3.5
用户头像
Hi, Ready to start.. Please PM me for more details............................................................................ Thank You
$30 USD 在2天之内
5.0 (1条评论)
0.8
0.8
用户头像
I'am ready to do this Assignement now and finish it after some hours contact me please I'am ready to do this Assignement now and finish it after some hours contact me please
$35 USD 在1天之内
0.0 (0条评论)
0.0
0.0
用户头像
I am available to complete this project for you. I am well-versed with the c++ language and have other colleague programmers to check the work in case I face any issues. Please choose me for your work and I will deliver the product like you've required it. best,
$88 USD 在3天之内
0.0 (0条评论)
0.0
0.0
用户头像
Hello! I can do the work, send a private message and let's talk about it. I would like to know when you need the code. See you!
$35 USD 在1天之内
0.0 (0条评论)
0.0
0.0
用户头像
Hi. I have read and understood your requirement. This assignment need only implement 3 classes. Class Ship is parent. And 2 remaining class are child. This assignment use operator, virtual method, override method and some component of OOP in C++. I have 4 year experience working with C++. And I believe that I am a good choice for your assignment. This assignment is so easy, so I can complete it in 1 day. Nice to work with you. Thanks for your reading. Good luck.
$35 USD 在1天之内
0.0 (0条评论)
0.0
0.0
用户头像
Hi! We are a team of Software Engineer looking for work. We are fresh here and would sincerely do the work. We have good practice for c++ programming. We all are Computer Science Engineers. We have good efficiency in HTML, CSS, Javascript, PHP , MySQL, Wordpress, Web design and development. Please give us an opportunity to prove ourself. Thank You.
$37 USD 在3天之内
0.0 (0条评论)
0.0
0.0
用户头像
experienced programmer and solving math problems , it's an easy job for me i can work really fast, if you need this really soon, i can start to work asap.
$30 USD 在1天之内
0.0 (0条评论)
0.0
0.0
用户头像
Hello, It is an easy assignment. Let me know if you will choose me to start coding. Thanks.. ........................
$30 USD 在1天之内
0.0 (0条评论)
0.0
0.0
用户头像
I can do it in about 2 hours, so if you want this done ASAP, I'll get it done for you , I would have set even a lower bid but the system didn't allow me.
$30 USD 在1天之内
0.0 (0条评论)
0.0
0.0
用户头像
A proposal has not yet been provided
$66 USD 在3天之内
0.0 (0条评论)
0.0
0.0

关于客户

UNITED STATES的国旗
destin, United States
5.0
1
付款方式已验证
会员自7月 18, 2014起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。