Welcome to Jurassic Park
In this assignment, you will be creating a console application that manages a zoo full of dinosaurs.
Objectives
- Practice control structures.
- Practice data structures.
- Practice working with user data.
- Practice with LINQ.
- Practice with OOP concepts.
Requirements
- Create a simple console application that manages the dinosaurs in your zoo.
Setup
dotnet new sdg-console -o JurassicPark
Explorer Mode
Create a class to represent your dinosaurs. The class should have the following properties
Name
DietType
- This will be "carnivore" or "herbivore"WhenAcquired
- This will default to the current time when the dinosaur is createdWeight
- How heavy the dinosaur is in pounds.EnclosureNumber
- the number of the pen the dinosaur is in
Add a method
Description
to your class to print out a description of the dinosaur to include all the properties. Create an output format of your choosing. Feel free to be creative.Keep track of your dinosaurs in a
List<Dinosaur>
.When the console application runs, it should let the user choose one of the following actions:
View
- This command will ask the user if they wish to see the dinosaurs in
Name
orEnclosureNumber
order. Based on that choice, the list of dinosaurs should be shown in the correct order. If there no dinosaurs in the park, print out a special message to the user.
- This command will ask the user if they wish to see the dinosaurs in
Add
- This command will let the user type in the information for a dinosaur and add it to the list. Prompt for the
Name
,Diet Type
,Weight
andEnclosure Number
, but theWhenAcquired
must be supplied by the code.
- This command will let the user type in the information for a dinosaur and add it to the list. Prompt for the
Remove
- This command will prompt the user for a dinosaur name then find and delete the dinosaur with that name.
Transfer
- This command will prompt the user for a dinosaur name and a new
EnclosureNumber
and update that dino's information.
- This command will prompt the user for a dinosaur name and a new
Summary
- This command will display the number of carnivores and the number of herbivores.
Quit
- This will stop the program
Adventure Mode
Consider what to do in Add/Remove/Transfer if multiple Dinos have the same name. Should
Add
prevent that from happening? ShouldTransfer
andRemove
show the multiple Dinos and prompt the user which one to work with?Add an option to view the Dinosaurs acquired after a given date (to be given by the user).
Add an option to view all the Dinosaurs in a given enclosure number.
Epic Mode
- Learn how to read and write from a file. At the start of the program load all the dinosaurs from a file. When the program ends write out all the dinosaurs to the same file.