Question
Draw a complete class diagram at implementation level for the following textual description. If in doubt about member visibility, choose the most restrictive option; however,
Draw a complete class diagram at implementation level for the following textual description. If in doubt about member visibility, choose the most restrictive option; however, only use private and public access modifiers. Make use of the concept of inheritance where appropriate. Only provide methods that are mentioned in the text. Do not specify multiplicities. Unless otherwise noted, assume that instance variables are initialized in explicit constructors and cannot be changed later on. Substitute italics, if needed, by placing a slash (/) before and after the italic portion. There is no need to use bold font.
Description: For a software project, different types of bikes shall be implemented. All bikes have a color (represented by a string). Race bikes have an additional weight limit (in kilograms with decimals). Fitness bikes may be equipped with a light; however, there is no need to model lights in software. It is only possible to create instances of race bikes and fitness bikes. Bikes can be ridden; for this purpose, rider weight is provided. When finished, bike riding indicates whether riding went fine or not. If the weight limit for a race bike exceeds the limit, the bike becomes broken. Race bikes are always non-broken, if they are created. Finally, there is a shop that stores multiple bikes. It is possible to create an empty shop or a shop with several bikes. Bikes can be added to and removed from the shop. Both actions require to know the bike of interest. The entry point for the bike application is part of the shop
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started