From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f40056d015b2ae33 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn13feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: Suggestions for topics in an Ada course? Reply-To: anon@anon.org (anon) References: <4737291e$0$27064$4d3efbfe@news.sover.net> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Mon, 12 Nov 2007 11:56:02 GMT NNTP-Posting-Host: 12.64.114.137 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1194868562 12.64.114.137 (Mon, 12 Nov 2007 11:56:02 GMT) NNTP-Posting-Date: Mon, 12 Nov 2007 11:56:02 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:18308 Date: 2007-11-12T11:56:02+00:00 List-Id: For Concepts First: Ada Conformity Second: Elaboration Third: The compiling process [ compile / bind / link ]. A. Compiler. Limited command line options. And they not needed to maintain portability with other operating environments. Unlike C 1. No conditional coding. Unlike C B. The Bind(er) -- Not used in C. 0. For your student why is Binding require for Ada code. 1. Performs consistent checking 2. Calculates elaboration order. 3. Determines the object code needed. 4. Builds a small program that calls the Elaboration routines in correct order and then calls main procedure that is the users program then calls finalization routines. C. Linker Fourth: Built-in constructs that can aid the programmer to create a higher integrity and efficient algorithm in a timely matter. Such as using Attributes and Exceptions for data validation and error checking. Example : X'Valid -- The attribute Valid returns true if the value of X is valid for X's pre-defined type. Assignment: The following was my first assignment in my Ada class. Given on the first day of class. Due Date was 2 weeks. Create 5 task: Tasks may be with a single procedure or grouped into one procedure and two packages. Signals are string that refect the action being perform or simulated. The following is basic an outline of the operation of the partition. Package 1 Task 1: Non functional until started by Task 2 Obtain a random number every X seconds from a pseudo random number generator function (user created). Transmit each number to Task 3. Task 2: Wait until Signaled from task 4 Startup Signal Task 4 that startup command has been received. Start Task 1 Signal Task 4 that Task 1 is operational. Shutdown Signal Task 4 that shutdown command has been received. Preform Task 1 shutdown Signal Task 4 that Task 1 has shutdown. -- Preform Task 2 shutdown Signal Task 4 that Task 2 has shutdown. Package 2 Task 3: Operational base on commands from Task 4 Receive a number from Task 1 Calculate a Sum of these numbers Transmit the sum to Task 5 every Y seconds. Clear and reset Sum Task 4: Wait until Signaled from task 5 Startup Signal Task 5 that startup command has been received. Signal Task 2 to perform startup Retransmit any signals from Task 2 to Task 5 Start Task 3 Signal Task 5 that Task 3 is operational. Shutdown Signal Task 5 that shutdown command has been received. Signal Task 2 to perform shutdown Retransmit any signals from Task 2 to Task 5 Preform Task 3 shutdown Signal Task 5 that Task 3 has shutdown. -- Preform Task 4 shutdown Signal Task 5 that Task 4 has shutdown. Procedure 1 which contains one task Task 5: A. Receive the number from Task 3 Calculate a total print Total and the Sum keep a running total. Procedure 1. Wait for command from user Startup Signal Task 4 to perform startup Print any signals received from Task 4 Startup Task 5 counting routine ( part A ) Shutdown Wait for shutdown command from user Signal Task 4 to perform shutdown Print any signals received from Task 4 Print a shutdown signal that Task 5 is shutdown Print a shutdown signal that Task 5 has shutdown This project may seam complex but it is not. TASK 2 and 4 are operational duplicates in nature. TASK 3 and 5 are functional similar, they both perform a summation, except for Task 3 which transmit the data to another task while Task 5 just prints the data. Also, another point of decision in the lab or classrom. Is procedure 1 a seperate Task, without the convension of a Task body. In <4737291e$0$27064$4d3efbfe@news.sover.net>, "Peter C. Chapin" writes: >I have the luxury of teaching a course next semester that can be about >anything I want. It's a course on "special topics" and the content is at >the discretion of the instructor. > >I would like to teach the students some Ada. > >The students in question are already competent programmers (in the >college student sense, that is). They have taken two courses in C/C++ >and so should be familiar with basic programming concepts, including >concepts like encapsulation, (operator) overloading, and inheritance. >The programs they have worked on so far have been typical programming >exercises given in first courses: nothing large or complicated. > >The course I'll be teaching has two hours of lecture per week plus a >three hour "lab" period where the students can work on some sort of >project or assignment in a supervised setting. So there is a fair amount >of time available. > >My thought was to cover the basics of Ada, the language, in the first >half (third?) of the course. My expectation is that because of their >background, the students will pick up the basic ideas fairly quickly. >The question becomes: in what direction should I take the rest of the >course? I would like to talk about something that shows the language in >a good light as well as captures student interest. Some kind of >introduction to a GUI library or network library might be good (the >students have never done any GUI or network programming before). Also >because I teach in a computer engineering curriculum, low level device >control applications would be reasonable and appropriate as well. > >Anyway, I'm sure I can put something together. However, I thought I >would ask here to see if anyone has some suggestions for libraries, >tools, etc, that I might look at as I prepare materials for next semester. > >In case it matters, I'll be using the GNAT compiler. > >Thanks! > >Peter