CST1620 C# Programming
Week 7
We cover chapter 8 in the book - Advanced Method Concepts.
Watch the class lecture recording for the week. We do in class exercises in the recording.
In class exercises:
OutExample
OptionalParameter
DivideByZero
Reverse4
NumberBases
MethodOverloading
Homework Labs:
Lab Chap 8 In class exercises (6) - due in one week
This was the six in class exercises. Turn in what we did in class.
Submit six things to the D2L dropbox for this lab:
1) Screenshot of the running program OutExample with as much of the code as possible. Make sure you capture your entire desktop.
2) Screenshot of the running program OptionalParameter with as much of the code as possible. Make sure you capture your entire desktop.
3) Screenshot of the running program DivideByZero with as much of the code as possible. Make sure you capture your entire desktop.
4) Screenshot of the running program Reverse4 with as much of the code as possible. Make sure you capture your entire desktop.
5) Screenshot of the running program NumberBases with as much of the code as possible. Make sure you capture your entire desktop.
6) Screenshot of the running program MethodOverloading with as much of the code as possible. Make sure you capture your entire desktop.
You do not need to turn in the solution folder zip files for these six. Screenshots showing the programs running is sufficient.
Chapter 8 Exercise 3 (8th edition) Flights - due in one week
Create a GUI program named Flights that accepts either an integer flight number or string airport code (Figure 8-36 shown below). Pass the user’s entry to one of two overloaded GetFlightInfo() methods, and then display a returned string with all the flight details. The method version that accepts an integer looks up the airport code, name, and time of flight; the version that accepts a string description looks up the flight number, airport name, and time. The methods return an appropriate message if the flight is not found.
Hints:
Submit three things to the D2L dropbox for each lab:
1) Screenshot of your running program with data. Make sure you capture your entire desktop.
2) Screenshot of as much of your code as possible.
3) The entire project folder as a ZIP file. This folder should contain your entire project and solution.

Do NOT do the lab below. Will be removed...
Chapter 8 Exercise 7 Averages - due in one week
Write a program named Averages that includes a method that accepts any number of numeric parameters, displays them, and displays their average. Demonstrate that the method works correctly when passed one, two, or three numbers, or an array of numbers.
Submit three things to the D2L dropbox for each lab:
1) Screenshot of your running program with data. Make sure you capture your entire desktop.
2) Screenshot of as much of your code as possible.
3) The entire project folder as a ZIP file. This folder should contain your entire project and solution.