Topical Information
This test will cover the blank and welcome/hello programs — that is,
the basic structure of all C++ programs including standard library usage,
cout and displaying things on the screen, the
twelve built-in data types and declaring variables and constants of those
types, cin and basic input techniques and
properties, and building a program from scratch.
In more detail, we've talked about:
- background:
- computer parts: CPU, RAM, disk, monitor, keyboard
- languages: machine, assembly, procedural, object-oriented, symbolic,
functional
- programming process: high-level language
--> compiler
--> executable
- errors: syntax vs. logic
- C++ basics:
- main, iostream,
#include, return,
;
- console, cout,
<<, "string",
'\t', '\n',
cin, >>
- data types: short,
long, (int),
double, char,
bool, etc.
- arithmetic: (),
-, *,
/,
+, -,
=
- literals vs. constants vs. variables
- importance of order:
- edit [create/change], save, compile, run
- declare, read, calculate, print
- style: comments
(//...\n as well as /*...*/),
naming (A-Z, a-z,
0-9, _; not too
short, but not too long), indention ({}!;
tabs vs. spaces), other spacing (in code vs. on screen; blank lines,
operator spacing, etc.)
- standard library:
- libraries:
- iostream:
cout, cin,
<<, >>
Bonus Information
Possible bonus questions from above or the following:
- more arithmetic:
- integer division
- modulo (%):
- unit conversion
- digit [group] extraction
- random number generation
- type casting (static_cast<desired type>(expression))
- more standard libraries:
- ctime:
- cmath:
- floor(x)
- ceil(x)
- fabs(x)
- sqrt(x)
- pow(base, exponent)
- exp(x)
- log(x)
- log10(x)
- sin(r)
- cos(r)
- tan(r)
- asin(t)
- acos(t)
- atan(t)
- atan2(y, x)
- cstdlib:
- srand(seed)
- rand()
- RAND_MAX
- abs(n)
- labs(n)
- limits:
- numeric_limits<streamsize>::max()
- more iostream:
- using the dot (.) operator with cin to call its class functions
- ignore:
- no arguments
- two arguments: count and terminating character
- ...and when the count is numeric_limits<streamsize>::max()...
- object oriented basics:
- a class describes a group of things'
general characteristics
- a class is a data type
- variables of a class type are called
instances or objects
- cin is an object of a class
- cout is an object of a class
- in particular a class describes behaviors
or actions a groups' members may be involved with as functions
- such member functions (aka methods) are called via the dot (.) operator
- dot operator syntax to call a member function with respect to a class object is: object.function(arguments)
Temporal Information
The first test will be
Thursday
of
week 3
—
September 6th
during the last 45 minutes of lecture.
(PLEASE STUDY!!!!)