semester review. as we have discussed, friday we will have in class time for you to work on a...

12
Semester Review COMPUTER SCIENCE I

Upload: asher-harmon

Post on 13-Jan-2016

215 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Semester Review. 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

Semester Review

COMPUTER SCIENCE I

Page 2: Semester Review. 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

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

Page 3: Semester Review. 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

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

Page 4: Semester Review. 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

“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

Page 5: Semester Review. 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

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

Page 6: Semester Review. 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

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

Page 7: Semester Review. 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

+ Adds/ Divides

- Subtract* Multiplies% Modulus

TYPES OF MATH

Page 8: Semester Review. 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

ONE Way – If statementTWO Way – If – else statement

MULTIPLE Way – Switch statement & If – else if - …. –

else statement

SELECTION

Page 9: Semester Review. 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

Librariesiostream,iomanipctimestring

REVIEW THESE

Page 10: Semester Review. 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

Match cout ___ and cin ____ with a & b

a. << b. >>

KNOW WHICH WAY

Page 11: Semester Review. 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

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

Page 12: Semester Review. 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

???????

We will have this, and Friday, before the Bonus we will spend some time going over any last minute questions.

Good Luck!

QUESTIONS