DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: I T

⟦372980e1d⟧ TextFile

    Length: 2386 (0x952)
    Types: TextFile
    Names: »INSTRUCTOR_NOTES«

Derivation

└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
    └─⟦5cb1d1d7f⟧ »DATA« 
        └─⟦3b1ee7bd8⟧ 
            └─⟦this⟧ 

TextFile

This is a Level I problem, designed to give the student experience using
the environment to code a procedure in Ada.

A programmer building this as his or her first program in Ada will find it
quite a challenge, not because of difficult Ada problems but because
the implementation problem is complex.  It is a actual problem that we
faced in the field at Rockwell Collins.

It is important to stress that they get something working the FIRST day
even if it is only the simplest case.  Encourage them to use the debugger
and help them to get started if they need it.

We have asked them to copy the spec for Format and into their own development
World for implementation.  They are also told that they will need a link
to Text_IO.  You may need to help them with these. 

When they have some testing done you will want to give them the Sample_Input
procedure that has all cases we can think of.  We that return with a solution
that they claim handles all cases, Instantiate the Test_Against_Golden_Output
with their Format procdure and execute the test.  If they are identical
they have completed the problem.
     
They will likely need to define a large number of local functions to help
out in the body.  Three that you might suggest are:

     Begins_With (Fragment : string; in_string : String);
     Ends_With   (Fragment : string; in_string : String);
     Contains    (Fragment : string; in_string : String);
     
although it might be better to let them start without this suggestion
and see if they gravitate to this idea on their own.

When they have completed something that works fairly well, you may want
to introduce them to Io and String_Utilities.  They should
go through trying to implement them straight to appreciate the utility
of reusable interfaces.
     
The primary things to point out in Io are the pre-instantiated
packages for numeric and boolean Io and the functional Get_line.

the cononical use of the Get_line is

    while not Io.End_Of_File (Input) loop
        declare
            Line : constant String := Io.Get_Line (Input);
        begin
    
            -- Operatate on the line
        
        end;
    end loop;
    

The most useful functions in String_Utilities are

    Strip 
    Locate

There exists a Format_Solution that may help you give them guidence.
You should also give this to them and discuss it when they have completed
the task.