Question
1. Please create a UML class diagram for a landscaping service with the following classes. (3 points diagram formatting) A class Plant that has attributes
1. Please create a UML class diagram for a landscaping service with the following classes. (3 points diagram formatting)
A class "Plant" that has attributes "species", "climate", and "feedType", all strings. Add an attribute "kittyPoison" of type Boolean. Add methods "Plant", "Water", "Fertilize", and "Remove". (6 points) A class "Location" that has attributes "address", "careInterval", and "pastDue", all strings. Add an attribute "plant", type Plant. (4 points)
Add an association between Plant and Location (1 point)
2. Paste a screenshot of your diagram below.
QUESTIONS (8 points)
3. How many methods are there in total on your diagram?
4. Suppose the service wants to track how often plants need to be watered. Would it be better to put this in the "Plant" class or the "Location" class? Why did you choose the way you did?
5. Suppose the service wants someone to be able to assign plants to location, but doesn't want them to have direct access to things like the plant's attributes. How should the UML diagram be changed to show not everyone has access to the "species", "climate", or "feedType" attributes?
6. Why is "kittyPoison" an attribute instead of a method? Does this gardening service have a problem with cats?
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