CSC 161 Lab #0"Review this"Our first lab is a review of CSC 160 stuff. Please peek at my template files in the Common Area on the k: drive. They are:
|
1. HelloOne, two, three...
Review: Using Mingw, cin, cout, functions |
||||||||||
2. Buy WidgetsAsk the user how many widgets he wants to buy and how much they cost. Sales tax is 7%. Print out a nice receipt, something like this:
Reviews: arithmetic operators, output formatting (fancy, dollars)
|
||||||||||
3. C-stringsWrite a function that takes a C-string and reverse the characters in it. Something like this:void reverse( char *str); Snarf a string from the user and call your function to test it. Did you do the reversal in place, without allocating another string? Reviews: C-strings, loops, arrays
|
||||||||||
4. DogsCreate a Dog class. Dog's have:
Now, in main(), create an array of 7 dogs. Read in a file of 7 dog names... you create the file. For each dog name your read in, set its name in the array. Finally, make each dog bark. Reviews: classes, objects, basic files |