Design a cruiseship class that is derived from ship class

Assignment Help C/C++ Programming
Reference no: EM13311500

Question 1)

Instructions: Ships, CruiseShip, and CargoShip Classes

Design a Ship class that has the following members:

• A member variable for the name of the shop (a string).
• A member variable for the year that the ship was built (a string).
• An initializer and appropriate accessor and mutators using any technique you want.
• A print function that displays the ship's name and the year it was built.

Design a CruiseShip Class that is derived from the Ship class. The CruiseShip class should have the following members:

• A member variable for the maximum number of passengers (an integer)
• An initializer and appropriate accessor and mutators using any technique you want.
• A print function that overrides the print function in the base class. The CruiseShip class's print function should display only the ship's name and the maximum number of passengers.

Design a CargoShip class that is derived from the Ship class. The CargoShip class should have the following members:

• A member variable for the cargo capacity in tons (an integer)
• An initializer and appropriate accessor and mutators using any technique you want.
• A print function that overrides the print function in the base class. The CargoShip class's print function should display only the ship's name and the ship's cargo capacity.

Demonstrate the classes in a program that has an array of ship pointers. The array elements should be initialized with the addresses of dynamically allocated Ship, CruiseShip and CargoShip objects. The program should then step through the array, calling each object's print function.

Question 2)

Project Description:

Create a GUI based application of your choice. This is your opportunity to create your own application that runs on OSX. Do NOT create an iOS (iPhone/iPad) mobile device app, this needs to be a traditional style Mac application that runs on OSX, any version (not mobile device).

Use multiple Objective-C classes that demonstrate concepts of inheritance as well as other object-oriented concepts presented in this class. Be creative and expressive. Create something you can be proud of and maybe use in the future.

Reference no: EM13311500

Questions Cloud

Describe a solar cell : Describe a solar cell. In your description, include the description, the efficiency of the cell and what the cell produces. Describe solar thermal energy
Find the magnitude of its angular momentum around the origin : As a 5-kg block travels around a 0.6-m radius circle it has an angular speed of 14 rad/s. find The magnitude of its angular momentum around the origin
Find out the number of carbon atoms in the compound : Determine the number of carbon atoms in the compound. Natural abundances: 12C is 98.93% and 13C is 1.07%
What is the potential difference across the capacitor : A 1.0cm * 1.0cm parallel-plate capacitor has a 2.0mm spacing. The electric field strength inside the capacitor is 1.3*10^5 V/m, What is the potential difference across the capacitor
Design a cruiseship class that is derived from ship class : SEN 970 Object-Oriented Programming in Objective-C. Demonstrate the classes in a program that has an array of ship pointers. The array elements should be initialized with the addresses of dynamically allocated Ship, CruiseShip and CargoShip objects..
The sprinters body do you measure from the foot head or arm : If someone is running in a 100m race and you want to work out the distance the sprinter has run what part of the sprinters body do you measure from the foot head or arm
Estimate the time difference between the two atomic clocks : Two atomic clocks are synchronized while on Earth before one is launched (within a GPS satellite) into a medium-altitude Earth orbit. estimate the time difference between the two atomic clocks
Explain what is the chemical formula a non-cyclic alkane : If a non-cyclic alkane shows a molecular ion peak at m/z 2.40 × 102, what is the chemical formula
Does the environment provide opportunity : Does the environment provide opportunity for desired levels of social behavior and Can one regulate the amount of social isolation so that desired levels of privacy can be maintained?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd