Previous Exercise | Next Exercise | Lecture | Top Level

Creating the Initial Framework

Context

We will now start the group project. For this, we will setup our work environment and acquaint ourselves with the project framework.

Exercices

  1. We start by writing a file called .aegisrc. This file goes into the home directory, and looks like this:

    default_development_directory = "your development directory";
    default_project_name = "your project name";
    
    This file is used to provide default arguments to most of the aegis commands.

  2. Next, you should edit your .cshrc file. Add the following line somewhere:

    source /public/u-aizu/lib/aegis/cshrc
    
    This will define aliases that will shorten most aegis commands. You might want to look at this file...

  3. Change 1
    Now you are ready to start working on your project. Type ael c to see your task. You should see:

    Project "monopoly-template"                               Page 1
    List of Changes                         Mon Nov 13 22:20:29 1995
    
    Change  State           Description
    ------- -------         -------------
       1    awaiting_       Set up initial framework
            development
       2    awaiting_       Populate initial framework
            development
    
    To begin development on the first item, type aedb 1. This will create a development directory in the directory you specified in your .aegisrc file. To enter this directory, type aecd.

    We will now add two files: config and Howto.cook (click on the names to retrieve the file).

    You should not edit these two files. The first one tells aegis what helper applications to use for building our project, the second file is an advanced kind of makefile. You are invited to look at them, but please do not modify them, otherwise your project will not build properly.

    To tell aegis that these two new files are part of our project, type aenf config Howto.cook.

    Your job in this project is to write functional classes. I will provide you with tests and the main() program that will implement the tests. Since at this point, there are no objects in the project yet, the main() program generated should be an empty hull.

    To build this hull, type aeb. Note how a file main.C gets created. Look at the file and see if you understand what it does. It will be easier to see once we get going with some real work.

    Aegis is intended to be used concurrently by all your project members. Right now, we have to do the first two changes in sequence, but in general, nothing prevents another team-mate from finishing his assignment while you were working on yours. To make sure that you have the most recent version of the source files, check for differences by typing aed.

    Since there are no objects, there is nothing to test. We can therefore end the development of the initial setup by typing aede. Note that you cannot do an aede if your aeb or aed failed. This effectivly prevents you from checking in a faulty product.

  4. Change 2
    If the first change was successful, you may now begin development of the second change. Type aedb 2. Note how the tests get copied into your development directory. Have a look at the files you got.

    Now, from your previous exercises, add the files for the four objects Base, Dice, Account and Game. Remember to tell aegis about those new files with aenf. Try to build with aeb.

    IMPORTANT NOTE:

    When including files, use only the following syntax:

    #include<header.h>
    
    Do not use quotes! Use the angular brackets.
    If the build was successful, try testing with aet. If the tests fail, you will have to correct your program. DO NOT edit the tests!

    If the tests passed, check for differences with aed and end development with aede.

Recap of aegis commands

ael c
List changes (tasks) in your project.
aedb change number
Start development on specified change.
aenf filenames
Tell aegis about new files you created.
aeb
Compile program.
aet
Test program.
aed
Check if your team-mates didn't slip ahead of you.
aede
End development on your change.
Note that you can undo most commands by appending a u at the end of the command name (e.g. aedbu means: "Oh, all things considered I better not start this one right now...").
Christian Goetze