In this mini-project, you will work with a group to complete the Zoo Animal and Employee Tracking app by filling in the missing classes while using TypeScript to build a robust fault-tolerant application.
-
As a developer, I want a robust fault-tolerant application built using TypeScript that will take in user inputs via Inquirer.js on the different animals living and employees working at the zoo.
-
As a developer, I want to follow the object-oriented programming (OOP) paradigm to build a modular, reuseable system for future development cycles.
-
It's done when I update the variables in the
index.tsfile to have a typed array. -
It's done when I create an
Employeeclass that theZooKeeperandZooWorkerclasses can inherit properties from. -
It's done when I create a
Workinterface that theEmployeeclass will implement methodreceivePay()from. -
It's done when I create an
Animalclass that will implement theZooAnimalsinterface. -
It's done when I can call the
startAnimalCli()method in theCli.tsfile to create a newAnimalobject and push it to theanimalsarray. -
It's done when I can call the
startZooKeeperCli()method in theCli.tsfile to create a newZooKeeperobject and push it to theemployeesarray. -
It's done when I am able to store the
Animalobjects after calling thestartAnimalCli()method in the associatedanimalsarray to see the list later. -
It's done when I am able to store the
Employeeobjects after calling thestartEmployeeCli()method in the associatedemployeesarray to see the list later. -
It's done when I can call the
feedAnimals()method in theCli.tsfile to iterate through theanimalsarray and, if the animal is hungry, console that the animal species will be fed. -
It's done when I can call the
payEmployees()method in theCli.tsfile to iterate through theemployeesarray and, if the employee's name exists, console that the employee is paid an amount specified in the prompt.
The following is a specification guide as to how the classes and interfaces should be created:
-
Animalclassspeciesas a stringhungryas a booleanweightas a numberamountas a numbermakeRollCall()as a method that returns how many animals of that species are in the zoo and whether they are hungry
-
Employeeclass- Implements
Workinterface nameas a stringidas a numbertitleas a stringsalaryas a numberreceivePay()as a method that takes in a pay(number) as a parameter and returns pay as a number
- Implements
Refer to the documentation:
How can we set up inheritance between classes?
How can we use interfaces to have a polymorphic application?
Β© 2024 edX Boot Camps LLC. Confidential and Proprietary. All Rights Reserved.