[SOLVED] SOLVED: Ownership object. ,Add Pet ,Search for Owner, Search for Pet ,List Owners,List Pets,Sort Owners.

30.99 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (1 vote)

The Assignment 8 class displays a menu of choices to a user // and performs the chosen task. It will keep asking a user to // enter the next choice until the choice of ‘Q’ (Quit) is // entered. // create an Ownership object. This is used throughout this class. //Add Owner//Add Pet//Search for Owner//Search for Pet //List Owners//List Pets// Sort Owners// Sort Pets//Remove Owner The BirthInfo class descrives birth information of a pet // including date, month, year, and place. // It also provides their accessor, mutator methods, // and toString method. //This method returns the date of the birth of a pet.// This method returns the month of the birth of a pet.// This method returns the year of the birth of a pet.// This method returns the place of the birth of a pet.// method sets the date of the birth of a pet.// method sets the month of the birth of a pet.// method sets the year of the birth of a pet.// method sets the place of the birth of a pet. The Owner class describes an owner entity and contains // attributes first name, last name, owner ID, and the number of pets. // It also contains the accessors and the modifiers of each attribute. //compareto method, compare last name and first name //return an integer OwnerParser.java-This is a utility class that takes a string containing // an owner’s information and parse it to create an owner object. Ownership.java-This class does a whole lot of things to the owner and pet objects // and adds them to the respective lists, sorts them, remove, etc. //add an owner, and checks if owner already exists //returns a boolean//remove owner, checks if owner already exists //returns a boolean and removes if true//check if pet exists by comparing everything about the pet //returns an integer//add a pet, check to see if already exists in petlist//returns a boolean//remove pet, check to see if already exists//if true, then removes pet from petlist The Pet class describes attributes in a pet // and provides accessor and mutator methods for each // instance variables as well as toString method. The PetParser class contains a static // method parseStringToPet that takes a string // containing a pet’s information and // create a pet object from it. This utility class sorts all objects passed through it.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.