Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Class diagram. Happy Cruise Lines has been acquired by MegaShip Lines, Inc., which has a fleet of oil tankers, container ships, and automobile transport ships.

Class diagram. Happy Cruise Lines has been acquired by MegaShip Lines, Inc., which has a fleet of oil tankers, container ships, and automobile transport ships. Thus, with the addition of Happy's cruise ships, MegaShip Lines will have four kinds of ships.

Draw an object-oriented generalization diagram, including aggregation relationships as needed, to represent MegaShip's new business environment, with the following attributes and operations. All of MegaShip's ships have ship number, ship name, year built, weight, miles traveled, and next overhaul date attributes. In addition, cruise ships have passenger capacity and next health inspection date; oil tankers have oil capacity, container ships have number of containers, and automobile transport ships have number of automobile attributes. An operation determines the next overhaul date for all of the ships in the same manner. Another operation determines the next health inspection date for cruise ships. An operation calculates the next date for a ship to be refueled. This operation is the same for oil tankers, container ships, and automobile transport ships, but is different for cruise ships because of safety precautions regarding the passengers. Oil tankers are composed of a hull, one or more engines, and one or more oil storage tanks. An attribute of hull is length, an attribute of engine is horsepower, and an attribute of oil storage tank is capacity.

As a hint, the following is a list of all the classes needed:`

SHIP

CRUISE SHIP

OIL TANKER

CONTAINER SHIP

AUTOMOBILE SHIP

HULL

ENGINE

OIL STORAGE TANK

You will need to also add the requisite attributes and methods, as described in the case study. Refer to the example diagram on page 261, for the Lucky Rent-A-Vehicle company, to see how attributes and methods are display in a class diagram.

THIS IS THE EXAMPLE OF A CLASS DIAGRAM

image text in transcribed

CUSTOMER Customer Number Customer Name Customer Address Customer Telephone RENTAL Rental Date Retun Date Total Cost 1. MAINTENANCE EVENT MANUFACTURER Vehicle Number Vehicle Type Manufacturer Name Repair Number Date Country 1 Year Sales Rep Name Sales Rep Telephone Repair Time LAND AIR Number of Wheels Flying Time Number of Crew Number of Weight Top Speed Update Mileage Calculate Next Overhaul Date CAR TRUCK Body Style Color Cargo Capacity Next Overhaul Date Number of Engines Type of Engine Next Overhaul Date Number of Passengers Calculate Next Calculate Next Overhaul Date (Airplane) Overhaul Date ENGINE BODY Engine Number Body Number FIGURE 9.8 Lucky Rent-A-Car Vehicle class diagram

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administration The Complete Guide To Dba Practices And Procedures

Authors: Craig S. Mullins

2nd Edition

0321822943, 978-0321822949

More Books

Students also viewed these Databases questions

Question

1. What do you defi ne as the start of interaction?

Answered: 1 week ago