HIERARCHY

Description

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.

Calculate the price of your order

Simple Order Process

Fill in the Order Form

Share all the assignment information. Including the instructions, provided reading materials, grading rubric, number of pages, the required formatting, deadline, and your academic level. Provide any information and announcements shared by the professor. Choose your preferred writer if you have one.

Get Your Order Assigned

Once we receive your order form, we will select the best writer from our pool of experts to fit your assignment.

Share More Data if Needed

You will receive a confirmation email when a writer has been assigned your task. The writer may contact you if they need any additional information or clarifications regarding your task

Let Our Essay Writer Do Their Job

Once you entrust us with your academic task, our skilled writers embark on creating your paper entirely from the ground up. Through rigorous research and unwavering commitment to your guidelines, our experts meticulously craft every aspect of your paper. Our process ensures that your essay is not only original but also aligned with your specific requirements, making certain that the final piece surpasses your expectations.

Quality Checks and Proofreading

Upon the completion of your paper, it undergoes a meticulous review by our dedicated Quality and Proofreading department. This crucial step ensures not only the originality of the content but also its alignment with the highest academic standards. Our seasoned experts conduct thorough checks, meticulously examining every facet of your paper, including grammar, structure, coherence, and proper citation. This comprehensive review process guarantees that the final product you receive not only meets our stringent quality benchmarks but also reflects your dedication to academic excellence.

Review and Download the Final Draft

If you find that any part of the paper does not meet the initial instructions, send it back to us with your feedback, and we will make the necessary adjustments.