Download presentation
Presentation is loading. Please wait.
Published byAsher Harmon Modified over 9 years ago
1
Semester Review
2
As we have discussed, Friday we will have in class time for you to work on a program, this program will come with instructions and you will place it in the N: Drive, and name it as indicated on Friday, this will be for bonus points on the final. Along with the best presentation bonus. There will be 2 Parts to the test, Knowledge of the Semester, there will be a question where you will apply critical thinking and create a solution to the given problem, and a logic problem along with it. Another portion of the test will be coding by hand. This section is not 100% accurate, so in this portion you can in fact use some psuedocode if you don’t exactly know how to code this section. These will be the two graded portions for the final. If you wish, we will take a grade from the presentation, and weight it as 20 points worth of the final exam. This is something as a class, we will discuss. FORMAT FOR THE TEST
3
This is the portion where we have invested the majority of our time this year. Logic is and isn’t the most important topic we will discuss this year, so having said this, I will say this. You need to know AND OR NOT XOR And the properties defined through DeMorgan’s Law You also need to know how to use these properties in your code. LOGIC
4
“for” loops – give the computer repetitive instructions as long as the iteration growth is within size of the condition, this either increases or decreases upon every repetition “while” loops – give the computer repetitive instructions as long as the condition is true, however if the condition is not initially true, the computer skips this section of code entirely. “do-while” loops – give the computer repetitive instructions if the condition is met, however, this loop structure differs from the while loop because specifically the loop runs a single iteration even if the condition is not true. LOOPS
5
Name – reserved word in C++ ~ Examples / More Examples Boolean – bool ~ True / False Double – double ~ 3.2 / 3.20000 Float – float ~ 3.2 / 3.200000000 Integer – int ~ 3 / 4 Character – char ~ ‘a’ / ‘3’ / ‘b’ String – string ~ “a” / “word” / “a phrase” DATA TYPES
6
int a = 2; a++; // a now equals 3 cout << a++ << endl; // would see out 3, and a now equals 4 cout << ++a << endl; // would see out 5, and a now equals 5 a--; is the decrement and is the same just opposite of the ++ Pre-increment ++a; Post-increment a++; a + = 1; // increases a by 1 a +=5; //increases a by 5 INCREMENTING VARIABLES
7
+ Adds / Divides - Subtract * Multiplies % Modulus TYPES OF MATH
8
ONE Way – If statement TWO Way – If – else statement MULTIPLE Way – Switch statement & If – else if - …. – else statement SELECTION
9
Libraries iostream, iomanip ctime string REVIEW THESE
10
Match cout ___ and cin ____ with a & b a. << b. >> KNOW WHICH WAY
11
Approach a problem by breaking it into its parts, Remember your machine cant solve the problem after you’ve coded it, if you remember something else as your putting in your data. You have to make sure from the moment you turn in your assignment, that you have done your best, and completed the assigned task. That you don’t have to make modifications. Think ahead, take things one step at a time, and don’t be afraid to have your approach fail, just be willing to try a new way once that way proves not to work. PROBLEM SOLVING SKILLS
12
??????? We will have this, and Friday, before the Bonus we will spend some time going over any last minute questions. Good Luck! QUESTIONS
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.