รบกวนมีใครสามารถทำ java program พอทำได้บ้างคะ

กระทู้คำถาม
JAVA program, we will be building on the authentication program you completed in program 6. If you were unsuccessful in getting that program working, I will be providing the solution to program 6 after the late submission window for you to use, if you wish.
Problem: Once you have properly verified the credentials of the user and determined their role, you will give them access to the menu appropriate for their role. For this program, we will only worry about the veterinarian and the zookeeper. We will not program for the admin, in order to keep the program manageable in size. Instead, for the admin, you will display the role message as you did in Program 6, and then it will immediately log them out and take them back to the initial menu. For the veterinarian, they will have access to the animals file and the zookeeper will have access to the habitat file.
You will create the following classes:
Animal
FileUtil
Habitat
MenuUtil
Veterinarian
Zookeeper

This is in addition to the classes that were used in program 6:
Credentials
InputOutput
User
Md5Digest
AuthenticationDriver

Before we start, be sure to load the animals.txt and the habitats.txt into Eclipse. 
Notice that the src folder is collapsed. With the src folder collapsed, you should still be able to see the text files. If you cannot see the text files, they are loaded in the wrong place.
AnimalClass:
This class stores the information for a single animal, after it has been read in from the Animals file.
Instance variables:
String variable that stores the type of animal
String variable that stores the name of the animal
String variable that stores the age of the animal//We need a string because it will include a label with the age
String variable that stores the health of the animal
String variable that stores the feeding schedule of the animal

Methods:
Custom constructor that accepts all of the instance variables and stores them.
Getters and setters for all instance variables
toString – should output all of the values without the ****** in front of them.

Habitat Class:
Instance Variables:
String variable that stores the name of the habitat
String variable that stores the temperature of the habitat
String variable that stores the food source
String variable that stores the cleanliness of the habitat

Methods:
Custom constructor that accepts all of the instance variables and stores them.
Getters and setters for all instance variables
toString – should output all of the values without the ****** in front of them.

Veterinarian Class:
Instance Variables:
an array of Animals
an integer variable that stores the actual size of the array

Methods:
Custom constructor that accepts all of the instance variables and stores them.
Getters and setters for all instance variables
loadArray – This method calls the readAnimal method of the FileUtil class and loads the animal array from the array returned by readAnimal.

Zookeeper Class:
Instance Variables:
an array of Habitats
an integer variable that stores the actual size of the array

Methods:
Custom constructor that accepts all of the instance variables and stores them.
Getters and setters for all instance variables
loadArray – This method calls the readHabitat method of the FileUtil class and loads the habitat array from the array returned by readHabitat

FileUtil class: This class handles all the reading of files for the animal and habitat.
Instance Variables: None
Methods:
openFile- This is a static method that accepts the name of the file and creates a Scanner from that file, and returns that Scanner object.
readAnimal- This is a static method that does the following:Creates an animal array
Calls the openFile method and passes in the animals.txt
Using the Scanner object passed back from openFile, read the contents of the file
Create an Animal object
Store the Animal object into an element of the animal array
Returns the animal array

readHabitat- This is a static method that does the following:Creates a habitat array
Calls the openFile method and passes in the habitats.txt
Using the Scanner object passed back from openFile, read the contents of the file
Create a Habitat object
Store the Habitat object into an element of the habitat array
Returns the habitatl array

MenuUtil class: This class stores the methods that display the menu options for animal and habitat
Instance Variables: None
Methods:
displayAnimalMenu-

Displays the following menu:
Choose which animal:   
1. Details on lions
    2. Details on tigers
    3. Details on bears
    4. Details on giraffes
    5. Return to login screen
    6. Exit
displayHabitatMenu:

Displays the following menu:
Choose your habitat:
1. Details on penguin habitat
2. Details on bird habitat
3. Details on aquarium habitat
4. Return to login screen
5. Exit
AuthenticationDriver class: You will be adding on to this class to provide the interactivity for the veterinarian and zookeeper.
Methods:
vetLogin and ZooLoginBoth of these will provide all of the coding that gives them access to the correct menu and correct files based on their role.

In your code where you output the message based on the role that the user credentials provided, after you output the message, you will call the vetLogin or the zooLogin.
zooLogin and vetLogin will be essentially the same, so I will only talk about the zooLogin.Create a zoo object.
Call the loadArrray from the Zookeeper class, which will load the contents of the file into the array.
Display the Habitat menu from MenuUtil
For each of the 1, 2 and 3 options of the habitat menu, you will do the followingประหลาดใจutput the details of the habitat without any ***** before them
Then, any fields that had ***** in front of them will be displayed with a warning: “Warning: food source needs attention”.
Example:

Habitat - Aquarium
Temperature: Varies with output temperature
Food source: Added daily
Cleanliness: Needs cleaning from algae
Warning: cleanliness needs attention
For option 4, it should take you back to the original menu:

Blomo's Zoo Data Access System
Please select an option
1)Log into System
2)Exit System
For option 5, it should display a message indicating that you are exiting and then the program should end.
แสดงความคิดเห็น
โปรดศึกษาและยอมรับนโยบายข้อมูลส่วนบุคคลก่อนเริ่มใช้งาน อ่านเพิ่มเติมได้ที่นี่