{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CSCI 1300.docx - Jan 20 Lecture Friday 12:56 PM...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Jan 20 Lecture Friday, January 20, 2017 12:56 PM Computational Architecture CPU RAM/Memory Storage In/Out devices Evolution of Languages B->C->C++ Abstraction Replacing a real word concept with another simplified stand in <<Cake example>> Building representations: 1 Create variable 2 Modify variable 3 Get input/out 4 Check if statement true or false 5 <<on lecture slide>> 6 Encapsulate statements Psuedo-Code Intended for human consumption, not computer consumption //pseudocodegoeshere Abstraction (layer above) of computer code Alg: Finding something on TV 1) 2) 3)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Jan 25 Lecture Wednesday, January 25, 2017 1:18 PM High/Low level languages Python/C++ are high level Python is interpreted C++ compiled beforehand HELLO WORLD: //comment on code to keep it organized and logical #include <iostream> Libraries Iostream -> in/out Using namespace std; Int main () { Cout << "Hello World"; Return 0; } Cout (console print) Cin ( Jan 27 Lecture Friday, January 27, 2017 1:03 PM Int main () Main code for program (algorithm) Example 5: Favorite number Refer to ppt for Knox code <<Fav#.cpp>> Data types: Int Integer (whole values)
Background image of page 2
(Int x,÷,+,- float = float) Float Floating point (precise values, not whole) Includes doubles (Float w/ more memory allocation for larger values) Char Character String Collection / list of data Bool Boolean **Void (not a data type, but used for functions that don’t need to return any data) (See ppt, example 5-1 for details in code) Variable declaration: Must be declared before use Can be outside of main/scope Scope: within the brackets it was defined in Generally, keeping scopes tight is ideal Variable names: Case sensitive Must begin with letter or _
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}