Prepare

In this challenge project, you’ll use Visual Studio Code to develop portions of a C# console application. You’ll use boolean expressions, selection statements, and iteration statements to implement the features of a design specification. As you develop the application, you’ll need to scope variables at the appropriate level.

Project specification

The Starter code project for this module includes a Program.cs file with the following code features:

  • The code declares variables used to collect and process pet data and menu item selections
  • The code declares the ourAnimals array that includes the following information for each animal in the array:
    • Pet ID #.
    • Pet species (cat or dog).
    • Pet age (years).
    • A description of the pet’s physical appearance.
    • A description of the pet’s personality.
    • The pet’s nickname.
  • The code uses a for loop around a switch-case construct to populate elements of the ourAnimals array.
  • The code includes a loop around a main menu that terminates when the user enters “exit”. The main menu includes:
    1. List all of our current pet information.
    2. Assign values to the ourAnimals array fields.
    3. Ensure animal ages and physical descriptions are complete.
    4. Ensure animal nicknames and personality descriptions are complete.
    5. Edit an animal’s age.
    6. Edit an animal’s personality description.
    7. Display all cats with a specified characteristic.
    8. Display all dogs with a specified characteristic.
    Enter menu item selection or type “Exit” to exit the program
  • The code reads the user’s menu item selection and uses a switch statement to branch the code for each menu item number.
  • The code includes implementation for menu options 1 and 2.
  • The code displays an “under construction” message for menu options 3-8.

Your goal in this challenge is to create the app features aligned with menu options 3 and 4.

 Note

New animals must be added to the ourAnimals array when they arrive. However, an animal’s age and some physical characteristics for a pet may be unknown until after a veterinarian’s examination. In addition, an animal’s nickname and personality may be unknown when a pet first arrives. The new features that you’re developing will ensure that a complete dataset exists for each animal in the ourAnimals array.

dell emc training courses malaysia

Leave a Reply

Your email address will not be published. Required fields are marked *