Mav's Animal Shelter Software Due Tuesday, March 1 at 8 a.m. CSE 1325 - Spring 2022...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Mav's Animal Shelter Software Due Tuesday, March 1 at 8 a.m. CSE 1325 - Spring 2022 - Homework #5 - Sprint 1 - Revision 0 - 1 Assignment Background This begins our class project for the semester. We intend to host 5 1-week sprints, each ending (logically enough) at 8 am on Tuesdays. This semester we will be developing the Mavs Animal Shelter Software (MASS), which manages a no-kill shelter aiming to help companion animals of various types to adopt humans. Yes, I have a soft spot for warm fuzzies. We need to keep track of the animals at our shelter, the human candidates for the animals to adopt, and the animal - candidate matches made in heaven. You are encouraged to replace Dog and Cat with other families of animals such as guinea pigs, tarantulas, snakes, lizards, or parrots. different class hierarchy, with the user interface at root and the data model in For the project, we will use package shelter. Sprint 1 In this sprint, you will build a basic data model similar to the previous two assignments. Plan your work in Scrum.xlsx, and include your planning and status information at cse1325/P05/docs/. In your git-managed cse1325 directory cse1325/P05/, with reference to the UML diagram below, create the Java package shelter. Remember, this means classes Animal, Shelter, and the two families of pets you choose (Dog and Cat are shown below) are within package shelter at cse1325/P05/shelter/, with package shelter; at the top of each file. The Mass class and build.xml are outside the package at cse1325/P05/. In class Mass, you must either import the classes from package shelter (for example, import shelter. Cat;) or use the fully qualified name (new shelter. Cat ()). Always build (ant) and run (java Mass) from the cse1325/P05/ directory. Write a very simple command line demonstrator program in class Mass for this sprint. This will be replaced next sprint with a simple graphical user interface. Add, commit, and push all files to your private cse1325 GitHub repository. Mass +mainlargs Strinall shelter Shelter -name: String -animals ArrayList Animal +Shelterineme: Stringl +addAnimaKanimal: Animal +tString String Dog neme: String gender: Gender age int Animal +Animelineme: String, pender: Gender, age: inti +String family: +String breed +toStringil: String breed: Dagbreed +Dogibreed Degreed, name: String gender: Gender, agent) +String family +String breedil: +tostringll: String DogBreed add your breeds here Gender male female Cat -breed: Cet reed +Catbreed: Calfireed name: String, pender: Gender, age inti +String family +String breedil: +teStringo: String CatBreed add your breeds here Hints Animal The Animal class is abstract, with methods family (optional) and breed as abstract methods. Although this class is abstract, you will have a constructor (invoked from subclasses) to initialize its fields. The constructor should also perform basic data validation and throw an exception for bad data. For example, if age is negative, throw an IllegalArgumentException with an appropriate message. You may include getters for the attributes if you need them, but not setters (at this time). Getters are not shown on the class diagram. Animal.toString may return whatever helps the subclasses with their toString. Dog Breed and Other Enumerations You should have an enumerated list of breeds for each family of animal you use. Google is your friend. Gender is also an enumeration. Dog, Cat, Whatever Your specific animal classes will extend Animal. Each constructor must collect data for the superclass via its parameters and delegate to the Animal constructor before initializing the local fields. Animal.family() must be overridden in each specific animal class to return a String representing that family, for example, "dog" or "bird". Alternately, you may use the instance Of operator to determine the type of each Animal. The toString should return something like "Charlie (7 year old male dog)", though the format is flexible as long as all fields are displayed. Shelter This class models the shelter itself. The shelter has a name such as "Arlington Loves Animal Companions" (ALAC), and also a list of all animals managed by the shelter (an ArrayList will work here). These should be private, as we do not expect Shelter to act as a superclass. Method addAnimal simply appends its parameter to animals. Until we get to iterators, use the numAnimals method to return how many animals the shelter is managing, and getAnimal(int index) to obtain a reference to a specific animal. You may NOT provide a getter for the ArrayList itself - that implementation detail may change! Method toString should return each animal's toString separated by newlines. Mass Write a main method that demonstrates your shelter package using the console (System.out or System.console()). Instance at least one of each of your family of animals, add them to the list, then print the animals in the shelter. Mav's Animal Shelter Software Due Tuesday, March 1 at 8 a.m. CSE 1325 - Spring 2022 - Homework #5 - Sprint 1 - Revision 0 - 1 Assignment Background This begins our class project for the semester. We intend to host 5 1-week sprints, each ending (logically enough) at 8 am on Tuesdays. This semester we will be developing the Mavs Animal Shelter Software (MASS), which manages a no-kill shelter aiming to help companion animals of various types to adopt humans. Yes, I have a soft spot for warm fuzzies. We need to keep track of the animals at our shelter, the human candidates for the animals to adopt, and the animal - candidate matches made in heaven. You are encouraged to replace Dog and Cat with other families of animals such as guinea pigs, tarantulas, snakes, lizards, or parrots. different class hierarchy, with the user interface at root and the data model in For the project, we will use package shelter. Sprint 1 In this sprint, you will build a basic data model similar to the previous two assignments. Plan your work in Scrum.xlsx, and include your planning and status information at cse1325/P05/docs/. In your git-managed cse1325 directory cse1325/P05/, with reference to the UML diagram below, create the Java package shelter. Remember, this means classes Animal, Shelter, and the two families of pets you choose (Dog and Cat are shown below) are within package shelter at cse1325/P05/shelter/, with package shelter; at the top of each file. The Mass class and build.xml are outside the package at cse1325/P05/. In class Mass, you must either import the classes from package shelter (for example, import shelter. Cat;) or use the fully qualified name (new shelter. Cat ()). Always build (ant) and run (java Mass) from the cse1325/P05/ directory. Write a very simple command line demonstrator program in class Mass for this sprint. This will be replaced next sprint with a simple graphical user interface. Add, commit, and push all files to your private cse1325 GitHub repository. Mass +mainlargs Strinall shelter Shelter -name: String -animals ArrayList Animal +Shelterineme: Stringl +addAnimaKanimal: Animal +tString String Dog neme: String gender: Gender age int Animal +Animelineme: String, pender: Gender, age: inti +String family: +String breed +toStringil: String breed: Dagbreed +Dogibreed Degreed, name: String gender: Gender, agent) +String family +String breedil: +tostringll: String DogBreed add your breeds here Gender male female Cat -breed: Cet reed +Catbreed: Calfireed name: String, pender: Gender, age inti +String family +String breedil: +teStringo: String CatBreed add your breeds here Hints Animal The Animal class is abstract, with methods family (optional) and breed as abstract methods. Although this class is abstract, you will have a constructor (invoked from subclasses) to initialize its fields. The constructor should also perform basic data validation and throw an exception for bad data. For example, if age is negative, throw an IllegalArgumentException with an appropriate message. You may include getters for the attributes if you need them, but not setters (at this time). Getters are not shown on the class diagram. Animal.toString may return whatever helps the subclasses with their toString. Dog Breed and Other Enumerations You should have an enumerated list of breeds for each family of animal you use. Google is your friend. Gender is also an enumeration. Dog, Cat, Whatever Your specific animal classes will extend Animal. Each constructor must collect data for the superclass via its parameters and delegate to the Animal constructor before initializing the local fields. Animal.family() must be overridden in each specific animal class to return a String representing that family, for example, "dog" or "bird". Alternately, you may use the instance Of operator to determine the type of each Animal. The toString should return something like "Charlie (7 year old male dog)", though the format is flexible as long as all fields are displayed. Shelter This class models the shelter itself. The shelter has a name such as "Arlington Loves Animal Companions" (ALAC), and also a list of all animals managed by the shelter (an ArrayList will work here). These should be private, as we do not expect Shelter to act as a superclass. Method addAnimal simply appends its parameter to animals. Until we get to iterators, use the numAnimals method to return how many animals the shelter is managing, and getAnimal(int index) to obtain a reference to a specific animal. You may NOT provide a getter for the ArrayList itself - that implementation detail may change! Method toString should return each animal's toString separated by newlines. Mass Write a main method that demonstrates your shelter package using the console (System.out or System.console()). Instance at least one of each of your family of animals, add them to the list, then print the animals in the shelter.
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
A Hydrogen atom has one proton in the nucleus and one electron in the shell. In a classic model of the atom, in a certain state, this electron is in a circular orbit around the nucleus with an...
-
A horizontal force of 310 N is exerted on a 2.0-kg ball as it rotates (at arm's length) uniformly in a horizontal circle of radius 0.90 m. Calculate the speed of the ball.
-
Describe some of the personality characteristics that researchers have identified about entrepreneurs.
-
For Problem 6.8, (a) Fit the corresponding negative binomial model with the same linear predictor. (b) Compare the analysis between part (a) and that from Problem 6.8. 6.8 For the Sexual Health pilot...
-
Alan Jackson invests $20,000 at 8% annual interest, leaving the money invested without withdrawing any of the interest for 8 years. At the end of the 8 years, Alan withdrew the accumulated amount of...
-
RELATIONAL DATABASE CONCEPTS: Describe the basic steps required to install the Oracle, SQL Server, and MySQL relational database management systems (RDBMSs) and the major challenges that the user may...
-
The MFG Corporation is planning to produce and market three different products. Let x1, x2, and x3 denote the number of units of the three respective products to be produced. The preliminary...
-
What is the formula for the data below using INDEX + MATCH A Sales Units Month January 6 February 5 March B C D 7 April 8,629 3,943 8,702 5,991 8 May 9 June 10 July 11 August 12 September 13 October...
-
If 4 sin(A)=5 and A is in the first quadrant, find cos()
-
Apply these questions to The Home Depot. What segment of the macro environment has the strongest impact (beneficial or detrimental) on this company's industry? Are all companies in the industry...
-
Discuss four broad activities that erode the value of the kenyan currency. State key financial disciples that would reduce the pressure for foreign currency
-
Describe the effect of each of the following bond features on the coupon rate of the bond. List any advantages or disadvantages of each feature. Any positive covenants. Also, discuss several...
-
1. (10 marks) Derive the explicit formula of the European call option on the maximal of 2 assets under the BSM model with payoff function given by f(S(T), S(T), K) = max(max(S(T), S(T)) K,0). -
-
S Company is an 80 percent owned subsidiary of P Corp. Excess at the time of acquisition only pertains to goodwill. The separate statements of comprehensive income of the two companies for 2011 are...
-
Calculate I, , and a for a 0.0175 m solution of Na 3 PO 4 at 298 K. Assume complete dissociation. How confident are you that your calculated results will agree with experimental results?
-
In 2012, Gale and Cathy Alexander hosted an exchange student, Axel Muller, for 9 months. Axel was part of International Student Exchange Programs (a qualified organization). Axel attended tenth grade...
-
Charlie's Green Lawn Care is a cash basis taxpayer. Charlie Adame, the sole proprietor, is considering delaying some of his December 2012 customer billings for lawn care into the next year. In...
-
Frank, age 35, and Joyce, age 34, are married and file a joint income tax return for 2012. Their salaries for the year total $83,000 and they have taxable interest income of $4,000. They have no...
-
What are FMEAs three risk assessment factors?
-
Cignet Plastics Corporation is a contract plastics die-casting house serving a wide range of clients. Over the years, Cignet has been a favored supplier of precision die castings for a major producer...
-
Contrast decision making with problem solving.
Study smarter with the SolutionInn App