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

  C programme to find the minimum and maximum value

write a c programme to find the minimum and maximum value each elements in each row ,to create table b,having 5 rows and 2 coloums,the first coloum of table b is the maximumvalue and thye second coloum is the maximum value in each row.

  Write a c program that asks for and reads in two integers

Write a C program that asks for and reads in two integers and then reports if one is a multiple of the other.

  Implement a standard sorted linked list class

Write C++ Program:Implement a standard SORTED linked list class. Be sure to include constructor/copy constructor, destructor, and assignment operator overload.

  Iimplement a client-server of the game

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

  Write a program in which the program print out the input

use (switch statement) to write a program in which the program print out the input (single character) if the character is not '2','t', or 'w'. Use 'default' and 'break' wisely.

  Multidimensional arrays

multidimensional arrays to life, let's consider a specific example: How can you visualize a 4-dimensional array? How can you give meaning to each dimension this array has? What kind of application would such an array be useful for?

  Program that displays the ball at a random

Write a C++ program that displays the ball at a random location and then makes the ball move down to the bottom of the screen. When the ball reaches the bottom of the screen, it should start these actions over again, appear-ing at another random l..

  Create a file, shared.txt

When your program starts, it shall do the following:1. Create a file, SHARED.txt, in the current directory (cwd). 2. Write it's pid (Process ID) followed by a Carriage Return and Newline in the file.

  Write a program that accepts as input, without prompts

Write a program that accepts as input, without prompts, a series of short values, terminated by end of file. The program outputs one line:

  Show the contents of the id array

Show the contents of the id array after each union operation when you use the quick find algorithm (Program below) to solve the connectivity problem for the sequence 0-2, 1-4, 2-5, 3-6, 0-4, 6-0, and 1-3.

  Ruby implement primitive types

How does Ruby implement primitive types, such as those for integer and floating-point data?  3-What is the single most important practical difference between Smalltalk and C++?

  Create a program for a company named retail-mart

Prompt the user to enter an item name (one word only), a quantity and a price. For this step, in addition to functionality, I'll be looking at: location of the variable declarations; appropriateness of data types selected; appropriateness of the va..

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