CST1620 C# Programming

Week 5

We cover chapter 6 in the book - Using Arrays.

Watch the class lecture recording for the week. We do the in class exercise in the recording.

Other topics covered are Integral numeric types and their max values, and how that affects the way you use them.

tada.wav
crowd5.wav
aww.wav


In class exercises:

Chapter 6 Test 1 (in class exercise) - example

Chapter 6 Exercise 10 GuessAWord (in class exercise) - example
Create a game similar to Hangman named GuessAWord in which a player guess letters to try to replicate a hidden word. Store at least eight words in an array, and randomly select one to be the hidden word. Initially, display the hidden word using asterisks to represent each letter. Allow the user to guess letters to replace the asterisks to represent each letter. Allow the user to guess letters to replace the asterisks in the hidden word until the user completes the entire word. If the user guess a letter that is not in the hidden word, display an appropriate message. If the user guesses a letter that appears multiple times in the hidden word, make sure that each correct letter is placed. Write this as a GUI application.

Note: You must include a sound in your program when guessing a correct letter or the final win.


Homework Labs:


Lab Chap 6 Test1 - due in one week

This was an in class exercise. Turn in what we did in class.

Submit three things to the D2L dropbox for this 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 solution folder as a ZIP file. This folder should contain your entire project and solution..


Lab Chap 6 Ex10 GuessAWord - due in one week

This was an in class exercise. Turn in what we did in class.

Submit three things to the D2L dropbox for this 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 solution folder as a ZIP file. This folder should contain your entire project and solution..


Lab Chap 6 Ex 5 DeliveryCharges - due in one week

example

Write a program called DeliveryCharges for a package delivery service. The program should use an array that holds at least 10 zip codes of areas to which the company makes deliveries. Create a parallel array that contains delivery charges for the zip codes. It is assumed that the delivery charge increases for zip codes that are further from the delivery service home base. Prompt the user to enter a zip code, and then display either a message indicating the price of delivery to that zip code or a message indicating that the company does not deliver to the requested zip code.

Hint: Read about the decimal data type.

Note: Create a GUI (Winform or WPF). Your choice.

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.