Note
Please come to both the classroom and the lab session, not just lab. Those who came to lab last time asked mostly questions I answered in the classroom session right before.Monday's Session
Thank you everyone who showed up Monday. I'll review everything for a few minutes today but I'm hoping everyone is at least comfortable with declaring variables and printing them to the screen (if you have trouble with these two things make sure to ask about them in class, and you might want to try reviewing the book again, these are the two things which you are expected to be very comfortable with at this point). Everything else we covered is very important as well (variables, functions, namespaces, include statements, using statements, etc.) and will come up en masse a little later in the course. It's much better if you start understanding these difficult concepts before you start getting tested on them all at once, so please ask any questions you might have about any of those.Brief
The goal for this session is to get everyone all set for the homework this weekend and to ensure that everyone has the necessary basic skills that will be used for the entire course.Outline
- [0-10 min] Q & A on anything that's been covered
- [5 min] Group review session
- [5-10 min] Very quick review on last week and what was covered Monday
- Quickly revisit quiz from last week
- Variables
- "A named location in memory."
- Data Types: int, float, double, string, bool, signed int, unsigned int, long, signed long, unsigned long.
- Non-initialized Variables (int i; cout << i;)
- Naming
- All lowercase letters
- Seperate words by an underscore
- Use meaningful variable names
- Functions
- Significance of main function
- Case-sensitivity
- Difference between int and double
- Streams
- Sending text to cout
- Sending variables to cout
- Strings
- Concatenation
- Integer division
- [15-25 min] Coding best practices exercise
- [10-20 min] Taking input from the user
- Input Stream cin
- Stream Extraction Operator (>>)
- Bad input, fail states
- [5-10 min] New operators
- Conjoined operators +=, *=, etc.
- Increment operator
- Prefix vs. Postfix version
- Unary, Binary, Ternary (don't worry about this list one) operators
- [10-15 min] More review on everything we've done
- [5 min] Quick verbal quiz on everything.
Lab Session
Our lab will be very similar to one of your typical labs for CS 10. You can think of it as a practice run for the real labs, however, it will be most useful as a time to put what you've learned into practice and actually cement it all into your mind before you are quizzed on it.
The lab that we'll be doing is very similar to the last lab (last Wednesday) however we will be using cin to take input from the user to fill in the various fields. It will be very similar to the homework so you should definitely come to lab if you are having any trouble on this week's homework
Create a program which displays the homepage of a Facebook console app. It should first ask the user for their username, hometown, friend_count, and a description. These should then be displayed onto the screen as follows:
+--facebook--------------------+
Name: [username] ([friendCount])
[description]
[username] comes from [hometown].
+------------------------------+
The maximum character count for the output can be no more than 80 characters. The maximum character count for you code can also be no more than 80 characters. Code should be properly formatted as described in the classroom session.
No comments:
Post a Comment