EEN318, Programming III, Autumn 2007
Assignments
- (due 20th September) A program that is able to read the text from a file, and display it
fully justified (with even left and right margins, except the last line), in a window
whose size is chosen by the user.
- example (due 1st November) Extend your word processor so that commands may be embedded in the text.
The commands should not be directly displayed on the screen, instead they should modify
how text is displayed. At least being able to change the font type, size, and colour,
and to start a new paragraph. Allow block structure, behaving like curly-brackets in
C++, so that changes made inside a block are reversed when that block ends. Syntax
like [font=arial] or [size=16] are quite good enough, but you can choose your own
syntax. You can use perhaps [begin] and [end] to delimit blocks, or C++'s { and },
or anything else within reason.
- The Map Program, the easy part. (due 10th November).
- The Map Program, the not-difficult part. (due 9th December).
Notes about Prerequisite Topics
- objects.html introductory stuff about objects, classes, structs
- fractions.html more of that
- introtoclasses.html and more
- startobject2.html and even more
- growarray.html Arrays that grow (vectors)
- Goldfish Club,
(older C-based version just for interest)
- FlexArray.doc Simple C++ vector of strings with "friends"
- GrowingArrays.doc Smaller examples of that
- declarations.html Complicated declarations in C++
Class History
- Class 1 (23-8-2006) General introductions, what we'll be doing.
- Class 2 (28-8-2006) Demonstration of making the computer do what it should; some early thoughts about a word processor.
- Class 3 (30-8-2006) The tokenizer object and tokens.
- Class 4 (4-9-2006) Reminding ourselves about resizable arrays, pointers to arrays, and similar things.
- Class 5 (6-9-2006) Strings in C (char *) and C++ (library object), the vector template.
- Class 6 (11-9-2006) Why pointers are our friends. Introducing inheritance.
- Class 7 (13-9-2006) Inheritance, calling parent class constructors, polymorphism and virtual methods.
New: instructions for using (free) visual
C++ 2005 express edition.
- Class 8 (18-9-2006) All about polymorphism and virtual methods.
- Class 9 (20-9-2007) Hash Functions and Tables: The fastest search method.
New version of the library, fixing all known problems,
for Microsquid Visual C++ versions 6, 7, and 8, now on the
download page.
- Class 10 (25-9-2007) void *, pointer type casts, Poisson test for hash tables, templates.
small template example.
- Class 11 (27-9-2007) General hash-table-able object through inheritance and polymorphism.
(doc), (pdf).
Using the poisson distribution pdf mdi.
- Class 12 (2-10-2007) The universal hash table, compiler directives (#) should be avoided, inline.
- Class 13 (4-10-2007) Static members, safe type conversion, complicated things. I'll put the example up.
- Class 14 (9-10-2007) Binary files, raw data formats. sample.
- Class 15 (11-10-2007) levels: C++/C/unix, low-level file operations.
unix/windows compatibility file.
- Class 16 (16-10-2007) Test preparation. The correct way to implement linked lists and other storage structures.
- Class 17 (18-10-2007) Review for the test, mainly virtual methods and polymorphism.
- Class 18 (23-10-2007) Test Day!!!
- Class 19 (25-10-2007) ...?
- Class 20 (30-10-2007) Handling huge amounts of connected data, e.g. for mapping software.
- Class 21 (1-11-2007) Formal rules, linked lists, trees, "dag"s, graphs. N+F=E+C.
- Class 22 (6-11-2007) Ordered Binary Tree construction and basic algorithms.
- Class 23 (8-11-2007) Insertion in an Ordered Binary Tree, Recursive in-order printing of a tree.
- Class 24 (13-11-2007) Printing leads to Tree Sorting, an O(n×log(n)) sorting method.
- Class 25 (15-11-2007) Reminders for the test, finding a route from A to B in an unordered tree.
(big-O fundamentals).
(big-O comparison chart).
- Class 26 (20-11-2007) Second Mid-Term
- Class 27 (27-11-2007) Searching a graph. Eastern Norway,
Negative Nebraska,
Positive Nebraska,
- Class 28 (29-11-2007) The shortest path algorthms.