Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Encapsulation, Inheritance and Polymorphism are some basic concepts of object - oriented programming. These are vital concepts, but they are used in daily life. By

Encapsulation, Inheritance and Polymorphism are some basic concepts of object-oriented programming. These are vital concepts, but they are used in daily life. By looking at everyday examples, it can help us understand these in development. Begin by reviewing the following three documents:
Part I: Classes Encapsulation
Encapsulation refers to the combining of data and code into a single object. Data hiding refers to an objects ability to hide its data from code that is outside the object. Only the objects methods may then directly access and make changes to the objects data. An object typically hides its data, but also allows outside code to access its methods. Going back to the three drawings, you have been asked to create a software plan that would allow the developer to keep each of the plots of land separate for inventory/tracking purposes but without having to re-create the wheel for every plot. Some of the things you will want to consider are: Plot Size, Plot Premium, House Allotments (as you can see, the smaller squares can hold only smaller houses), Addresses/Location, House Selected (to go on a plot, the same houses cannot go next to each other according to the county). All house building supplies for the particular house: Flooring, Counter tops, Color Siding, etc
For Part I:
1. Write a description of how you would handle this situation.
2. Create a class diagram for the basic plot.
Part II: Classes Inheritance
When an is a relationship exists between objects, it means that the specialized object has all of the characteristics of the base object, plus additional characteristics that make it special/different.
Inheritance involves a superclass and a subclass. The superclass is the general/base/parent class and the subclass/child is the specialized class.
The developer has decided that instead of coming up with a brand-new floor plan for each separate model home, they want to come up with a base home plan, so note the similarities and differences between the two main floors.
For the 2nd part, address the following questions:
What would you include in the base home plan? (Note: The base home plan should be as generic as possible but include everything that both of them should have. Remember you can change sizes and some features.)
What would you add/change in the home plan for Home 1?(Remember it would automatically inherit everything from the base home plan.)
What would you add/change in the home plan for Home 2?(Remember it would automatically inherit everything from the base home plan.)
Now create the base-class and sub-class diagrams in Visio.
Part III: Classes Polymorphism
The term polymorphism refers to an objects ability to take different forms. It is a powerful feature of object-oriented programming. In this section, we will look at two essential ingredients of polymorphic behavior:
1. The ability to define a method in a superclass, and then define a method with the same name in a subclass. When a subclass method has the same name as a superclass method, it is often said that the subclass method overrides the superclass method.
2. The ability to declare a class variable of the superclass type, and then use that variable to reference objects of either the superclass or the subclass types.
The developer is looking at all the options for the houses. Review the Options drawing and note all of the different bathroom options. So, if you create the base floor plan (boxed in red), you then need to determine all the options for the bathroom. (Hint: The method name may be something like bathing, etc. We are using a floor plan, and we are using a bit of creative license here with methods/variables).
For Part III, provide new responses that address the following:
What would you now include in the base floor plan?
What would you change for each of the various bathroom options? What methods(features) would you override from the base class? (Note that here are 6 different bathroom options)
Now create base-class and sub-class diagrams.
Part IV: Class Diagrams
Now it is time to put it all together. You have been asked by the company to put the class diagrams together starting out with the plot diagrams. Utilizing what you have already designed, put them all together for a full plan to demonstrate how you plan on developing the housing development program.
For Part IV, address how you will implement the program:
How would you write a program to allow users to shift from working with plots to the houses?
What modules would you develop to align all the various options?
image text in transcribed

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

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

Explain the need for and importance of co-ordination?

Answered: 1 week ago

Question

Explain the contribution of Peter F. Drucker to Management .

Answered: 1 week ago

Question

What is meant by organisational theory ?

Answered: 1 week ago

Question

What is meant by decentralisation of authority ?

Answered: 1 week ago

Question

Timeline for final evaluation

Answered: 1 week ago

Question

How will it be used?

Answered: 1 week ago