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)...
-
When B3-carotene is oxidized in vivo, it breaks in half and forms two molecules of retinal (vitamin A), which is a precursor to the pigment in the retina responsible for vision (Impact I14,J). The...
-
Consider a multiple-issue design. Suppose you have two execution pipelines, each capable of beginning execution of one instruction per cycle, and enough fetch/decode bandwidth in the front end so...
-
Consider the following cases. (a) A small 0.6-in.-long fish swims with a speed of \(0.8 \mathrm{in} / \mathrm{s}\). Would a boundary layer type flow be developed along the sides of the fish? Explain....
-
Minsoo Ltd. is a retailer operating in Edmonton, Alberta. Minsoo uses the perpetual inventory method. All sales returns from customers result in the goods being returned to inventory; the inventory...
-
What do we know about the Galaxies over time according to https://webb.nasa.gov/content/science/galaxies.html What are some of the unknowns How might the JWT shed light on the galaxies over time?...
-
Jamie Lee and Ross, now 57 and still very active, have plenty of time on their hands now that the triplets are away at college. They both realized that time has just flown by; over twenty-four years...
-
13. The table below shows the approximate distribution of human blood groups in a sample of 100 people in a population. Blood group A Frequency 26 20 Rh + ve 4 22 18 Rh-ve B AB 3 1 O 50 42 8 (a)...
-
The present value of an annuity with the first payment starts 10 years from today can be calculated in two steps: (1) using the PV of an ordinary annuity formula calculate the present value of the...
-
On October 20, Aries decides to switch his PDP to a Medicare Advantage plan. Aries would like this change to be effective November 1. Which statement is true for Aries? There are no rules governing...
-
Sue purchases a $300,000 whole life policy. The annual premium rate is $23.99 per $1,000. Find her annual premium. 7197 If she lives for 30 years, find the total she paid in premiums over the 30...
-
What's wrong with the slide? Fill out the chart below Identify 3 things wrong with this slide, and how you would fix each.
-
1. Release data must be sent electronically unless there is a specific reason why it cannot be done. Provide 3 reasons why release data cannot be submitted electronically. 2. Describe CBSA's Machine...
-
Find the exact value of the expression. sin (cos-()-tan-()) 6
-
(a) Explain why the concentration of dissolved oxygen in freshwater is an important indicator of the quality of the water. (b) How is the solubility of oxygen in water affected by increasing...
-
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...
-
You are setting up a chatbot agency to service marketing, sales and customer services teams. Discuss the advantages and disadvantages of setting up the business as a sole trader or company and the...
-
Principles for Responsible Management Education (PRME) is a not-for-profit entity. It engages business schools to ensure they provide future leaders with the skills needed to balance economic and...
-
Entities are expected to perform in environmental, governance and social areas as well as profit (unless a not-for-profit entity). List some key performance indicators applicable to each sphere.
Study smarter with the SolutionInn App