Software Engineering (10th Edition)
10th Edition
ISBN: 9780133943030
Author: Ian Sommerville
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 7, Problem 7.4E
Program Plan Intro
Hierarchy Chart:
- The hierarchy chart is for top-down
programming . - The hierarchy chart is also known as structure chart.
- It is mainly used to visualize the modules used in the program.
- A module is a set of program statements that is used to perform a specific task.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
If you are designing an application for a car dealership, you will create a Vehicle parent class and then extend the class into Car, Truck, SUV child classes. The Vehicle class will have the general attributes and behaviors. Then, you only need to code the specific differences in the child classes. Give us an example of objects that might have similar attributes and behaviors but enough differences to warrant an inheritance relationship. Then, explain the relationship and teach your classmates about inheritance.
Inheritance makes it more difficult to design object class tests. Explain.
Why do we use inheritance?
when you want to combine classes.
when a "is-a" relationship exists
when there is a "has-a" relationship
Chapter 7 Solutions
Software Engineering (10th Edition)
Ch. 7 - Prob. 7.1ECh. 7 - Assume that the Mentcare system is being developed...Ch. 7 - Prob. 7.3ECh. 7 - Prob. 7.4ECh. 7 - Develop the design of the weather station to show...Ch. 7 - Prob. 7.6ECh. 7 - Draw a sequence diagram showing the interactions...Ch. 7 - Draw a UML state diagram showing the possible...Ch. 7 - Prob. 7.9ECh. 7 - Prob. 7.10E
Knowledge Booster
Similar questions
- In what scenarios would you choose to use an abstract class over an interface, and vice versa?arrow_forwardJust the class diagramWrite an inheritance hierarchy for the classes quadrilateral, trapezoid, parallelogram, rectangle, and square. Use quadrilateral as the superclass of the hierarchy. Add as many levels as possible to the hierarchy. Specify instance variables and methods for each class. The private instance variables of quadrilateral must be the x,y coordinate pairs for the four endpoints of the quadrilateral. Write a program that creates object instances of your classes that prints the area of each object.arrow_forwardImplement the following hierarchy shown in Figure 1, using Java Inheritance. The class Student is the parent class. Note that all the variables are private and hence the child classes can only use them through accessor and mutator methods.arrow_forward
- Draw an inheritance hierarchy for the people in your place of study or work. For example, if you are a university student, then your university probably has students (first-year students, second-year students, . . . ), professors, tutors, office personnel, etc.arrow_forwardCan't we utilise a Parent Class object in the Child Class and enjoy all of its features?arrow_forwardAll of the abstract methods that the parent class has defined must be implemented by any subclass. What do you think?arrow_forward
- You need a means of guarding against unintentional corruption of class fields.arrow_forwardConsider a three-dimensional (3-D) geometric shape as a concept. Any such 3-D shape will have a volume and surface area, but until you know the nature of the shape and its attribute dimensions, these will be abstract in nature. Design and implement an inheritance hierarchy starting with a 3-D shape, then a set of at least three derived classes that define regular 3-D shapes such as a cube, sphere, cylinder. Include a UML class diagram showing the design. Any general 3-D shape will have a name, but few other attributes. For each derived shape, store fundamental attribute data about its dimensions, and provide methods to access and modify this data. In addition, provide appropriate methods to compute each shape’s volume and surface area. For example, a cube has a volume of s3 where s is the length of a side, whereas a sphere has a volume of 4πr3/3 where r is the radius. In terms of style, every class should have constructors and a toString() method that properly uses inheritance.…arrow_forwardONLY THE UML DIAGRAM. NOT THE CODE.arrow_forward
- In this part of the course work you are required to change the definition of the Item_in_Stock class to make it an abstract class and change the getItemCat(), getItemName() and getItemDescription() definitions to make them abstract methods. You are then required to design and implement three classes which are derived from Item_in_Stock class to fully demonstrate the concept of inheritance and polymorphism. Implementation of HP_Laptop class in part II should have given you an idea of inheritance and polymorphism. Three sub classes, one class against each category (Computers, Laptops and Accessories), should contain appropriate constructors, instance variables, setter and getters methods and overridden methods for getItemName(), getItemDescription() and get_Item_details() method. You should be creative and come up with your own ideas of sub-classes. The question: Write code in Java with all these classes implementation and a program called Polymorphism_works with member method…arrow_forwardConsider the following scenario: A chicken, eagle and duck are birds. A dog, cat, cow,and lion are animals. Human and Birds are also animals. Peas, carrots, and grass areplants. Chicken, duck, cow, and plants are edible. Draw a class diagram for the abovescenario. You can use classes, inheritance, interfaces, and associations (includingcomposition or aggregation) when needed. You shouldn’t use operations.arrow_forwardFor this problem you are to join the following classes into a hierarchy (use the UML diagrams from Module 2 to get started): Player - Super Class Archer - Subclass Barbarian - Subclass Cleric - Subclass Rogue - Subclass Warlock - Subclass If the parent class has the same attributes as the sub class then you can remove those attributes from the subclass. If the class is new for this module, please come up with 2 unique attributes of your choice, and 1 piece of functionality. If the sub classes are shown on the same level, then they share a parent class.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT