Purpose: To practice writing java classes and implementing inheritance Degree of Difficulty: Easy. The tasks required...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
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 ... View the full answer
Related Book For
Smith and Roberson Business Law
ISBN: 978-0538473637
15th Edition
Authors: Richard A. Mann, Barry S. Roberts
Posted Date:
Students also viewed these programming questions
-
ARTICLE: Amazon.com Announces Third Quarter Results QUESTIONS: 1. What is Amazon's value proposition? What is its brand promise? 2. i. Amazon launched a number of new services in 2022. What impact...
-
Most borrowers only pay attention to the monthly payment when taking out a loan. Why do you think this is? How can this benefit the lender?
-
Question 1 (9 points): Purpose: To practice creating UML Class and Sequence Diagrams Degree of Difficulty: Easy. The tasks required in this assignment are not difficult, but do require thought and...
-
Classify the following as microeconomics or macroeconomics and provide a justification for your choice. (i) The effect of changes in household saving rates on the growth rate of national income. (ii)...
-
Suppose that a persons body resistance is 950 . (a) What current passes through the body when the person accidentally is connected to 110 V? (b) If there is an alternative path to ground whose...
-
You have learned about social media, the Internet, and blogging. You have also created your own blog. In this activity, you will introduce a blog owner (a company, organization, or school). You'll...
-
Dogway Candy Company sells candy on consignment to "big-box" stores and currently has $\$ 1,000,000$ in accounts receivable. Its days sales outstanding (DSO) is 50 days (based on a 365-day year). The...
-
British Quince comes across an average-risk investment project that offers a rate of return of 9.5%. This is less than the company's normal rate of return, but one of Quince's directors notes that...
-
2. Find the worst-case time complexity of the OpenMystery algorithm below. Input: n: positive integer 1 Algorithm: OpenMystery 2 Let open be a Boolean array of size n 3 Initialize open to false 4...
-
The University of the Bahamas has two operating departments: School of Business and School of Education. Each of the operating departments uses the services of the company's two support departments:...
-
In a plane electromagnetic wave, the electric field oscillates sinusoid ally at a frequency of 2.0 x 10 Hz and amplitude 48 V m- (a) What is the wavelength of the wave? (b) What is the amplitude of...
-
Daphne Brown-Wright worked as a teacher for East St. Louis School District 189 from 1975 until 1998 and then returned as an administrator from 2002 until 2012, thus serving the District for 33...
-
On March 13, 2009, Juan Mendez Sr. was admitted to a nursing facility. On that day, a doctor employed by the facility determined the father lacked the capacity to give informed consent or make...
-
In July 2008, Brian, Dale, and Sandra Allen signed a contract with East Resources, Inc., concerning 148 acres of the Allens property. East wanted to develop and exploit the oil and gas resources...
-
What is the plain-meaning rule?
-
On February 16, 2005, Joseph and Margaret Buset borrowed $192,000 from Fremont Investment & Loan (the Originator). The loan was secured by a mortgage on a residential condominium. The mortgage named...
-
2. Which type of compressor requires a reservoir for compressed air and why? rotary compressor to avoid pulsating effect reciprocating compressor to avoid pulsating effect both rotary and...
-
The nitrogen atoms in N2 participate in multiple bonding, whereas those in hydrazine, N2H4, do not. (a) Draw Lewis structures for both molecules. (b) What is the hybridization of the nitrogen atoms...
-
Identify the three elements of an enforceable quasi contract and explain how it differs from a contract.
-
Civil Code 1719, subdivision (a) provides in part that any person who draws a check that is dishonored due to insufficient funds shall be liable to the payee for the amount owing upon the check and...
-
Iverson owned Iverson Motor Company, an enterprise engaged in the repair as well as the sale of Oldsmobile, Rambler, and International Harvester Scout automobiles. Forty percent of the businesss...
-
What is the primary business of Satyam Computer Services Ltd?
-
In January 2009, approximately how many employees did Satyam Computer Services employ?
-
What was the cash balance sheet amount and how much cash actually existed in the Satyams bank accounts?
Study smarter with the SolutionInn App