Draw a uml class diagram to support your claim

Assignment Help Computer Engineering
Reference no: EM131721913

In this case, creating separate subclasses of Car is more trouble that it is worth, because the inventory program probably does not have to treat different models of cars in different ways. Therefore, it is probably more appropriate simply to designate the make of the car in a field of the class, as illustrated in the UML class diagram below.

The larger question at play is this: "What characteristic of an object is significant enough to warrant a subclass rather than simply data in a field?" Think about an application in your field of expertise and the classes that you would define for that application.

Post a response that describes the application you choose and the class within that application. Identify one or two key distinctions within that class that would prompt you to create subclasses instead of fields within the main class. Explain your reasoning, giving specific examples of objects in each of the classes and subclasses you discuss, and draw a UML class diagram to support your claim.

EXAMPLE:

Basically this diagram shows that you do not need to create 4 classes (Car, Ford, Volvo, Toyota), you only need 1 class called Car with the make of the car as our extra field to distinguish the different car makes (the bottom UML calls this car make as type and declares it as a String with "type : String", I would personally call it "make : String" ;-) Anyway, same thing...

So this is an example of when NOT to create too many classes when just 1 is enough to capture all the various Car makes provided we include this "type: String" field in the class itself.

for an Organism. I cannot create a single class called Organism and slap in there the name of the organism and perhaps the size. There are just too MANY other unique characteristics that would help me characterize each of the various organisms. So I will need to create a class hierarchy. The first characteristic is whether the Organism is a Plant or Animal. These organisms are so different that I need to create 2 subclasses (children classes) under the parent Organism class.

So this leads to 1 parent and 2 subclasses so far. Then I take the Animal class for example. Again, I cannot stop here because there are so many different kinds of Animals. What types? Well, Mammals, Fish, Snakes, etc. These are soooo different in terms of characteristics that again, I am best-served to define another level in my hierarchy to be able to distinguish the various animals. Similarly there are different kinds of Plants (Trees, Flowers, etc) and you can then even go deeper and break the Trees into Fruit Trees and Shade Trees or whatever.
The bottom line is that 1 parent class is NOT enough when we need a HIERARCHY or TAXONOMY to represent the many different types of organisms. So the trick here in answering this question is to think of a hierarchy to help you define say the first 2 levels (parent and children) of this hierarchy. You do not need to go to 4 levels as I did with, -grandchildren), just 2 levels for L1 and L2 is enough as long as you explain why you need 2 levels as I did.

Reference no: EM131721913

Questions Cloud

Prepare balance sheet for hightower corporation : Presented below is the trial balance of Hightower Corporation at December 31, 2017. Prepare Balance Sheet for Hightower Corporation at December
How does an organization increase the perception of value : How does an organization increase the perception of value to its customers? Provide an example of added value and how it might impact the customer.
What do you remember about this time : Do you remember when you went from learning to read to reading to learn? What do you remember about this time?
How to install a change on a set of computers : Changing the information in a router can be tricky because it is impossible to change all routers simultaneously. Investigate algorithms that guarantee.
Draw a uml class diagram to support your claim : Identify one or two key distinctions within that class that would prompt you to create subclasses instead of fields
Calculate the total relevant cost : Steele Bicycle Manufacturing Company currently produces the handlebars used in manufacturing its bicycles, Calculate the total relevant cost
Four-step assembly operation with quality problems. : Consider the following four-step assembly operation with quality problems. All resources are staffed by one employee.
Estimate of the population mean water usage : Compute and explain a 95% confidence interval estimate of the population mean water usage per day.
Investigate algorithms used to exchange routing information : In an internet, routers periodically exchange information from their routing tables, making it possible for a new router to appear and begin routing packets.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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