You accomplished a lot since you started this class. Let’s take a moment to look back at what you learned, and to make sure you understand all those notions and skills. If you have a doubt, feel free to look back at the corresponding lab.
What You Learned
To Use Visual Studio
What the structure of a project is.
How to open a pre-existing project.
How to open a template and edit it.
How to re-name a project or its files.
How to avoid modifying the files of a project outside of VS.
ALT + F4 to close VS (or any Windows program, actually)
Ctrl + Shift + b to build the solution
Ctrl + F5 to start the program without debugging
Ctrl + Shift + n to create a new project
Ctrl + Shift + F12 to “jump” to the line where VS thinks there is an error
Ctrl + Shift + f to open the “Find and Replace” menu
CTRL + k and CTRL + d to indent your code
To compile your code frequently.
To read the error messages.
To organize your files, to perform regular backups, and to make sure that those backups were correctly done.
To Write Programs!
What the important parts of a program are.
To display messages on the screen using Write and WriteLine.
To display messages on the screen that include escape sequences.
To declare, assign, and display variables on the screen.
To read a string from the user.
To convert a string into an integer.
To manipulate various numeric datatypes:
To choose the appropriate numeric datatype
To determine the “legality” of an operation involving two different datatypes
To use the cast operator to explicitely convert between datatypes
To be able to identify the datatype of literals
To read numeric values from the user.
Academic Life
Not to be afraid of your professor (hopefully!).
How, where, and when to ask for help.
What are my expectations for this class.
How to organize your workflow and the importance of planning ahead.
…to be continued!
Maybe you decided what your major was going to be. Maybe you changed your mind. Maybe you’re not sure. Being confused and uncertain is sometimes part of the process of making decisions and learning, and that’s all right. It is normal to hesitate. This page by a colleague in Computer Science may be a good read for students hesitating between IT, CS, and MIS, or wanting to have more information about those majors. The “Cyber” options are not treated, you can find more options about them by reaching out to the Cyber Center.
Working on Problem-Solving
Here is a problem that involves almost all the previously mentioned notions and skills. It is phrased in a more abstract way; closer to the kind of problem you will be facing if you were a software developer. Think about what you need to do before starting to type your code and, when you start writing your code, make sure you compile it frequently.
Write a program that asks the user for their name, their number of guests, and the total number of pizza slices the party wants to have. Your program should then display the name of the user, the number of people at the party, the number of total slices, and how many slices each guest will have, assuming the slices are to be shared equitably.
A couple of additional precisions:
The user of the program also wants some pizza, so the number of people at the party is the number of guests plus one.
Once you’re done, you need to test your program:
What happen if the user provide “normal”, plausible data? Does your program work as expected?
What happen if the user have 2 guests and 4 slices? Will everyone get 4 / 3 = one slice and a third, as they normally should?
What happens if the user has 0 slices?
What happens if the user has 0 guests?
What happens if the user has -4 slices?
What happens if the user has -1 guest?
If you want, you can change your program so that it displays the number of slices per guest without it being a fractional number, and the number of remaining slices. For instance, a user entering 4 guests and 16 slices should read that every member of the party will have ⌊16/(4 + 1)⌋ = 3 slices and that 16mod(4 + 1) = 1 slice will be left.