Shared Flashcard Set

Details

Programming III
n/a
30
Computer Science
Undergraduate 2
01/13/2009

Additional Computer Science Flashcards

 


 

Cards

Term
CLR
Definition
Common Language Runtime
Term
FCL
Definition
Framework Class Libraries
Term
GUI
Definition
Graphical User Interface
Term
IDE
Definition
Integrated Development Environment
Term
JIT
Definition
Just in Time
Term
RAD
Definition
Rapid Application Development
Term
What is a class template?
Definition
Lets you define a class in generic terms. You can use it to create specific classes for specific types.
Term
What is a valarray class?
Definition
targeted to deal with numeric values ( or with classes with similar properties), so it supports operations such as summing the contents and finding the largest and smallest values in an array. defined as a template class.
Term
double gpa[5] = {3.1, 3.5, 3.8, 2.9, 3.3};
valarray v1;
valarray v3(10,8)
valarray v4(gpa,4)
Definition
// an array of int, size 0
// an array of 8 int elements
// an array of 8 int elements each set to 10
Term
use class members that are themselves objects of another class
Definition
containment
composition
layering
Term
has-a relationships
Definition
Containment, private inheritance, and protected inheritance
Term
what is another way of saying:
*this;
Definition
this[0];
Term
what is the draw back for using typedef?
Definition
Have to edit the header file each time you change the type.

you can't have typedef represent two different types simulaneously
Term
What do templates provide, and what does it mean?
Definition
Parameterized types

capable of passing a type name as an argument to a recipe for building a class of function

Term
template

what is another term you could use instead of class?

Definition
typename
Term
how do you change the class qualifier to make it templated
Definition
example:
template
Stack::Stack() {}
Term
What does the export keyword let you do?
Definition
place the template method definitions in a seperate file, provided that you preface each template declaration with export

export template // preface class Stack { ... }

Term
What are type parameters?
Definition
act something like variables, but instead of assigning a numeric value, you assign a type to it
Term
how do you write out to a file?
Definition
<< or .write()
Term
How do you read in a file?
Definition
>> or .get()
Term
How do you associate an object to a particular file?
Definition
ofstream fout;
fout.open("jar.txt");
-or-
ofstream fout("jar.txt");
Term
what is the fstream a child class of?
Definition
iostream
Term
What does the ofstream allocate space for?
Definition
an output buffer for each ofstream object
Term
How does an object of ofstream collect data?
Definition
byte-by-byte, transfers contents to destination file via buffer
Term
How do you read in a character from a file?
Definition
char ch;
fin >> ch;
Term
How do you read in a word from a file?
Definition
char buf[80];
fin >> buf;
Term
How do you read in a line from a file?
Definition
char buf[80];
fin.getline(buf, 80);
Term
How do you read in a file to a string object?
Definition
string line;
getline(fin, line);
Term
How do you explicitly close a connection with a file?
Definition
fout.close(); // close output connction
fin.close(); // close input connection
Term
what are three ways to check to see if the attempt to only a file failed?
Definition
if(fin.fail())
if(!fin)
if(!fin.is_open())
Supporting users have an ad free experience!