NEWS
8/5/10 - Our various 8ball codes
Get the code here!
7/21/10 - Don't forget to include RandomInt code!
function RandomInt(low, high)
// Given : low <= high
// Returns : a random integer in the range [low, high]
{
return Math.floor(Math.random()*(high-low+1)) + low;
}
7/14/10 - Project Proposals Due!
Project groups are required to include at least 3 people. There should be an appropriate amount of work to do depending on the final size of the group. All members will be expected to contribute equally and be part of the final presentation.
Projects must include elements from what we discussed in class, as well as elements that have been researched and explored on your own. The project should be something that your group can accomplish in 20 - 35 hours of group work.
1. Who do you plan to work with?
2. What do you plan to do?
7/8/10 - Memory required
A summary of the basic fundamental data types in C++, as well as the range of values that can be represented with each one:
Name | Description | Size* | Range* |
---|---|---|---|
char |
Character or small integer. | 1byte | signed: -128 to 127 unsigned: 0 to 255 |
short int ( short ) |
Short Integer. | 2bytes | signed: -32768 to 32767 unsigned: 0 to 65535 |
int |
Integer. | 4bytes | signed: -2147483648 to 2147483647 unsigned: 0 to 4294967295 |
long int ( long ) |
Long integer. | 4bytes | signed: -2147483648 to 2147483647 unsigned: 0 to 4294967295 |
bool |
Boolean value. It can take one of two values: true or false. | 1byte | true or false |
float |
Floating point number. | 4bytes | +/- 3.4e +/- 38 (~7 digits) |
double |
Double precision floating point number. | 8bytes | +/- 1.7e +/- 308 (~15 digits) |
long double |
Long double precision floating point number. | 8bytes | +/- 1.7e +/- 308 (~15 digits) |
wchar_t |
Wide character. | 2 or 4 bytes | 1 wide character |
* The values of the columns Size and Range depend on the system the program is compiled for. The values shown above are those found on most 32-bit systems. But for other systems, the general specification is that
int
has the natural size suggested by the system architecture (one "word") and the four integer types char
, short
, int
and long
must each one be at least as large as the one preceding it, with char
being always one byte in size. The same applies to the floating point types float
, double
and long double
, where each one must provide at least as much precision as the preceding one.
7/1/10 - Don't forget to get your homework turned in by 11pm!
Here are some links from today's class.
6/22/10 - Homework one is up and due before class on Thurs.
* Class will be in Klamath
026B13 beginning Wed 6/23* My office Hours will be
- After class on Tuesdays
- Before class on Wednesdays* Today's slides are here