Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Purpose: To practice writing java classes and implementing inheritance Degree of Difficulty: Easy. The tasks required in this assignment should not be difficult, but

Purpose: To practice writing java classes and implementing inheritance Degree of Difficulty: Easy. The tasksEvaluation 1 Mark: Animal Class Declaration  1/1 marks: Animal Class formatted correctly.  0/1 marks: Animal2 marks: Animal Class Attributes 2/2 marks: name and age attributes declared correctly  1/2 marks: one

Purpose: To practice writing java classes and implementing inheritance Degree of Difficulty: Easy. The tasks required in this assignment should not be difficult, but given it's the first time writing java code, it may take longer than expected. Restrictions: This question is homework assigned to students and will be graded. This question shall not be distributed to any person except by the instructors of CMPT 270. Solutions will be made available to students registered in CMPT 270 after the due date. There is no educational or pedagogical reason for tutors or experts outside the CMPT 270 instructional team to provide solutions to this question to a student registered in the course. Students who solicit such solutions are committing an act of Academic Misconduct, according to the University of Saskatchewan Policy on Academic Misconduct. The objective of this question is to learn how to create java classes and implement inheritance relationships. You will be creating two entity classes based off of the UML Class Diagram below: Animal -name:String -age:Integer +Animal(name:String, age:Integer) +eat() +getName():String +getAge():Integer Dog -breed:String +Dog(breed:String) +bark() +getBreed(): String Evaluation 1 Mark: Animal Class Declaration 1/1 marks: Animal Class formatted correctly. 0/1 marks: Animal Class not formatted correctly 2 marks: Animal Class Attributes 2/2 marks: name and age attributes declared correctly 1/2 marks: one attribute declared incorrectly, or missing 0/2 marks: both attributes declared incorrectly, or missing 3 marks: Animal Class Methods 3/3 marks: All methods implemented correctly 2/3 marks: One method implemented incorrectly, or missing 1/3 marks: More than one method implemented incorrectly, or missing 0/3 marks: All methods implemented incorrectly, or missing 1 mark: Dog Class Declaration 1/1 marks: Dog class formatted correctly 0/1 marks: Dog class not formatted correctly 1 marks: Dog Class Attributes 1/1 marks: breed attribute declared correctly 0/1 marks: breed attribute declared incorrectly, or missing 2 marks: Dog Class Methods 2/2 marks: All methods implemented correctly 1/2 marks: One method implemented incorrectly, or missing 0/2 marks: All methods implemented incorrectly, or missing

Step by Step Solution

3.42 Rating (158 Votes )

There are 3 Steps involved in it

Step: 1

The task is to create two Java classes Animal and Dog based on the given UML class diagram The Animal class should have two attributes name a String and age an Integer and three methods a constructor ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Smith and Roberson Business Law

Authors: Richard A. Mann, Barry S. Roberts

15th Edition

1285141903, 1285141903, 9781285141909, 978-0538473637

More Books

Students also viewed these Programming questions