January 29, 2018
Deadlines: This lab needs to be completed and perfectly understood before exam #1 (02/15).
Dependencies: This lab uses the knowledge you acquired in all the previous lab.
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. If you haven’t already, look at the “Pushing Further” parts of those previous lab, as noted below.
Write
and WriteLine
(Lab 3 - Part I)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 taking 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.
If you haven’t done the optional parts of the lab, it may be a good moment to go back and look at them. Computer Science and Information Technology (aspiring) majors are strongly recommended to look at those “Pushing Further” parts. Those parts help you to be ready for the future: they prepare you for the next lab, give you heads-up on the lecture, and tease your curiosity. In them, you learned (or you’ll learn):
.NET Core
and .NET framework
(Lab 3)int
, a float
and a double
into a string
(Lab 5 and Lab 6)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 number of pizzas they have. Your program should then print the name of the user, the number of people at the party, the number of pizzas, and what portion of pizza will everyone have, assuming the pizzas will be shared equitably.
A couple of additional precisions:
It would be nice if you could use (some of) the following techniques: