2 Attachment(s)
How do I create a class called Dog in Java?
I am really struggling with this assignment for my Computer Science I course. If anyone could help me that would be amazing. The attach documents are the data needed to be used in the programme
This is exactly what I need to have:
Design and implement a class called LostDog that contains instance data that represents the dog’s name, gender, breed, and owner status (as a Boolean flag to represent whether the owner is unknown or found).
Define the LostDog constructor to accept and initialize instance data. Include getter and setter methods for all instance data. Include a to String method that returns a one line description of the dog.
Create a driver class call DogPound that will contain an array that will reference all lost dogs, using the LostDog object. You will use an input file to upload lost dogs into the array (the file and code to process it will be provided). Copy the input file lostdogs.csv to the project folder of your eclipse workspace.
In addition, include code to enable someone to search the pound for a lost dog.
Prompt the user to enter the name of the dog, and search the array to see if any dogs match that name (you can assume all dog names in the pound are unique). If there is a match, change the dog’s status to “owner found” and report to the owner that you have found the dog.
Optional extras:
• allow the user to continue to search for dogs until they decide to quit
• create your own input file with a larger set of lost dogs (need to change SIZE)
• once the user quits, produce a report of all lost dogs, followed by a report of all found dogs
• allow the user to search by breed (this may result in duplicates)
• other ideas?
Attachment 1176
Attachment 1177