"Write a class" Assignment
Module Two Assignment Guidelines and Rubric.html
Overview
UML class diagrams are useful tools for mapping out different classes for an object-oriented program. The UML class diagram displays the attributes and methods of each class as well as shows relationships between classes. In this activity, you will analyze a UML class diagram and implement either the Cat or Dog class. The purpose of this activity is to give you practice interpreting UML class diagrams so that you will be prepared to implement the Pet Class for your Project One submission in Module Three.
Prompt
For this assignment, you will select either the Cat or Dog Java class from the UML diagram provided in Project One and implement it. Open the Virtual Lab by clicking on the link in the Virtual Lab Access module. Then open your IDE and create a new class. Use the Eclipse IDE and Downloading Files From Eclipse tutorials to help you with this project.
- Review the UML Class Diagram, paying special attention to the class hierarchy, attributes, and behaviors. A text version of the UML Class diagram is available: UML Class Diagram Text Version.
- Next, implement either the Cat or Dog Java class in the IDE. Your class must meet all the specifications from the UML Class diagram. Be sure to include the following in your Cat or Dog class:
- All attributes with appropriate data structures
- The Cat and Dog classes both have their own attributes (class variables). For example, the Cat class has the catSpaceNbr attribute. In addition to the dog- and cat-specific attributes, they both inherit from the Pet class. This means the Dog and Cat classes will also have the seven attributes from the Pet class.
- At least one constructor method
- Accessors and mutators for all attributes
- Each attribute should have a corresponding “set” and “get” method. For example, there will be a getPetType() and setPetType() method for the petType attribute. Make sure to do this for all attributes.
- In-line comments and appropriate white space, according to the style guidelines you have learned so far in the course
- All attributes with appropriate data structures
Guidelines for Submission
Attach your completed Cat.java or Dog.java file to the assignment submission page.
Module Two Assignment Rubric
| Criteria | Exemplary (100%) | Proficient (85%) | Needs Improvement (55%) | Not Evident (0%) | Value |
| Attributes | Creates a class that includes all attributes with appropriate data structures | Meets most “Proficient” criteria, but with minor errors; areas for improvement may include appropriate data structures or naming conventions | Meets some “Proficient” criteria, but with major errors; areas for improvement may include functionality, syntax, or logic | Does not attempt criterion | 35 |
| Constructor Method | Creates a class that includes at least one constructor method | Meets most “Proficient” criteria, but with minor errors; areas for improvement may include method structure or return values | Meets some “Proficient” criteria, but with major errors; areas for improvement may include functionality, syntax, or logic | Does not attempt criterion | 20 |
| Accessors and Mutators | Creates a class that includes accessors and mutators for all attributes | Meets most “Proficient” criteria, but with minor errors; areas for improvement may include method structure or return values | Meets some “Proficient” criteria, but with major errors; areas for improvement may include functionality, syntax, or logic | Does not attempt criterion | 35 |
| Industry Standard Best Practices | Uses industry standard best practices such as in-line comments, and uses appropriate naming conventions to enhance readability | Meets most “Proficient” criteria, but with minor errors; areas of improvement may include consistency of naming conventions and level of detail for in-line comments | Meets some “Proficient” criteria, but with major errors; areas for improvement may include appropriate naming conventions or inclusion of in-line comments | Does not attempt criterion | 10 |
| Total: | 100% |
course_documents/IT-145 UML Class Diagram Text Version.docx
|
Pet |
|
- petType - petName - petAge - dogSpace - catSpace - daysStay - amountDue |
|
+ checkIn() + checkout() + getPet() + createPet() + updatePet() |
|
Dog |
|
+ dogSpaceNbr + dogWeight + grooming |
|
+ getGrooming() + setGrooming() + getDogWeight() + setDogWeight() |
|
Cat |
|
+ catSpaceNbr |
Arrow pointed from table labeled Dog to table labeled Pet; arrow pointed from table labeled Cat to table labeled Pet