Write a UML diagram for a Cat class. Your cat has 3 attributes: name (i.e. Tobey) which
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a UML diagram for a Cat class.
Your cat has 3 attributes:
- name (i.e. Tobey) which is a String
- breed which is the type of cat it is (i. e. Himalayan Sealpoint), also a String
- gender which is a char (M is for Male, F is for female)
- age which is an int (i.e. 2)
Make sure you write the class name in the top box, the private data members in the second box, and the constructors along with the getters and setters in the last box. For the constructor, pass in the name, breed and gender as parameters. Make sure you have all the correct notation for the UML diagram. If you are having trouble, look at the rectangle example in the power point slides from Chapter 3.
UML Class Diagram for Cat
|
|
|
Related Book For
Posted Date: