Create class Matrix (3x3), which has
member variable: 2-dim 3x3 array of integers,
Matrix() /default constructor creating a matrix with elements =0,
Matrix(n) /constructor creating an diagonal matrix (n-s on the main diagonal (if i=j), 0
using namespace std;
integers, of characters, and of
doubles, and of strings, and test some of th
April 3, 2013
using namespace std;
Node(int data, Node* link);
void set_data(int new_data);
Lab 9 (STL): due Tue, Apr 16.
Use STL classes to create linked list, stack, and queue of integers, of characters, and of doubles, and of
strings, and test some of their basic methods.
Extra credit (+2pt). Test any algorithms from STL in your m
Lab 2: member variables and member functions of a class, constructors
Define a class called Odometer that has member functions fuel and mileage
for an automotive vehicle. Include member variables to track the
miles driven and the fuel efficiency of the ve
Lab 4: Recursion
Chocolate bars problem
Suppose we can buy chocolate bars from the vending machine for $1 each. Inside every
chocolate bar is a coupon. We can redeem 7 coupons for 1 chocolate bar from the machine.
We would like to know how many chocolate
This program uses dynamic arrays to store login information for NUMLABS labs. NUMLABS
is a constant assigned at the beginning of the program. You should have a type definition of
IntPtr as a pointer to integer (typedef int* IntPtr;) at the beginnin
Lab 7 (Linked List, Stack, and Queue).
1) Define class Node with member variables: int data, Node* link, and member functions: Node(),
Node(int value, *Node next), ~Node(), accessors: getData(), getLink(), mutators: setData(int
Review for Final Exam
Thur, April 18, 2-4:30, Went 210
Topics covered in the course
Materials from Bb
Classes, Member Variables and Functions,
Public vs. Private, Creating Objects
Friend Functions, Overloaded Operators
Lab 8 (Templates).
1) Change classes Node, LinkedList, Stack, and Queue into template classes.
2) In main() create linked list, stack, and queue of integers, of characters, and of doubles (or strings),
and test all their methods.