Introduction

Completed

Applications often use a combination of selection and iteration statements to establish code execution paths. In addition, user input and calculations influence the flow through an application. Creating a user interface that implements a design specification can be challenging.

Suppose you're a developer working on the Contoso Pets application, an application that's used to find homes for stray or abandoned pets. Some of the development work has already been completed. For example, the application's main menu and the code used to store new pet information have been developed. However, certain information isn't always available when a pet is entered in your system. You need to develop the features that ensure a complete dataset exists for each animal in your care.

In this module, you'll develop the following features of the Contoso Pets application:

  • A feature that ensures animal ages and physical descriptions are complete.
  • A feature that ensures animal nickname and personality descriptions are complete.

By the end of this module, your Contoso Pets application will ensure that every element in the ourAnimals array is complete.

Note

This is a challenge project module where you’ll complete an end-to-end project from a specification. This module is intended to be a test of your skills; there’s little guidance and no step-by-step instructions.

Learning Objectives

In this module, you'll demonstrate your ability to:

  • Use Visual Studio Code to develop a C# console application that uses a combination of selection and iteration statements to implement logical workflows.
  • Evaluate the underlying conditions in your application and make an informed decision between selection statement options.
  • Evaluate the underlying conditions in your application and make an informed decision between iteration statement options.
  • Scope variables at an appropriate level within an application.

Prerequisites

  • Experience using Visual Studio Code to develop, build, and run C# console applications that include console I/O and access the methods of .NET classes.
  • Experience using C# code to evaluate conditional expressions and manage variable scope inside and outside of code blocks.
  • Experience using if-elseif-else and switch-case statements in C# to match a variable or expression against several possible outcomes.
  • Experience using foreach, for, do, and while statements in C# to loop through a block of code and access elements of array variables.