$PH/05f523/05f523asgnt1-2.txt ----------------------------- This contains the first two assignments in course 05f523. For these and future assignments you will need an account on UML/CS Linux servers which you apply for in OS310. UML/CS help office (OS310) or UML Telecommunications (Olsen first floor) has online help files and/or reprints on rlogin via putty/ssh vt100 emulation on your PC. UML Computer operations (Olsen first floor) has tutorials on unix/linux shell commands. 05f523 Assigntment 1 is based on Slides 17-20 of: http://www.cs.uml.edu/~lechner/BreuggeOOSE/content/lectures/ch10lect1.ppt Slide 17 shows code resulting from the (unqualified) M:N association between Tournament and Player classes at top of (the same) slide 17. Slide 18 shows a qualified M:N association between League and Player and slide 19 shows the resulting code. ASSIGNMENT: (This is better done by 2 persons working as a team and sharing their work by 'chmod -R 755 $PWD/asgnt1' at logout.) [do NOT chmod -R 755 $HOME - privacy will disappear.] 05f523sgnt1:(due Sept 20) --------------------------- (1a) Create directory ~/05f523/asgnt1, and write two files TP.sch and LP.sch for these 2 data models. For ease of comparison, name your tables TO=TOurnament, LE=league, PR=Player, TP = TO<-->PR and LP = LE<-->PL. (1b) Check out gen/ver_13 from CVSROOT = $GENROOT (grep ROOT ~lechner/.login) [Students who have taken 91.522 OOAD should use gencpp instead of chgen13.] (1c) Build chgen13 in your own ~/05f523/asgnt1 working directory (1d) Run chgen13 to generate code for persistent database support. (1e) Compare the pr_*.c and schema.h outputs from chgen13 for your two data models and summarize what you see. ----------------- Part 1a is due on or before next week - Sep. 13. [Warning: Do NOT wait until due_date-1 to begin this asgnt. I advise you to try b,c,d before Sep. 13 as well.] (1a) has an obvious deliverable - your schema.sch inputs to chgen. It is CRITICAL that you get these right [Remember: garbage-in ==> garbage out] -------------------- Parts 1b-1e above are due in two weeks - Sep. 20. [DO NOT hand in auto-generated code: I know what it looks like.] I AM interested in error messages you get during steps 1b,c,d (cvs co, make, chgen13) ASAP, to minimize any delay of progress. (Think 'Agile Programming' :-). In step (1e), I am interested in your understanding of the generated code, particularly its differences vs. its repetitiveness. Communication outide of class: ---------------------------- This class meets only once a week, so get in the email habit :-) Report problems PROMPTLY to lechner@cs.uml.edu. BE SURE to include enough data for me to work on: E.g., one way to save everything is: 'script' command; [your commands;...] CTRL-D. 'col -bx < typescript > asgnt1step?bugreporot.date Email to me by pasting-in plain-text - DO NOT ATTACH FILES! (e.g., in elm/vi use :r filename; in pine, use CTRL-R filename;) You can mail full pathnames to typescript files instead, but BE SURE access mode is set to: for directories:755, for files: >= 644. ============================================ 05f523asgnt2:(due Oct. 10) --------------------------- This continues the problem in asgnt1 above. (2a) Write your own test application for each schema above. Write 'constructors' to add table rows to each class (you can adapt the book's Java code to C++). (2b) Write test drivers for your methods using command line input of parameters, and (2c) populate the sample database with test data. (2d) Run your tests and dump database snapshots of before-and-after results with pr_dump. (If you're adventurous, use chgen13 -log for code generation; have main() call pr_startlog() after pr_load(); inspect its output schema.txt and schemaDB12.dat files.) ============================================ Further Notes on OOSE Chapter 10 slides 17-21 ------------------------------------ Slide 19 clearly illustrate what are equivalent to association instance constructor methods that cross-call each other: e.g. addPlayer(League t) and addLeague(Player p). The risk of infinite recursion is completely avoided by a guard condition in the code of each parent method: 'iff (!obj1.containsKey(obj2)) do '. The code in slide 17 does exactly the same thing for Tournament and Player. I sent a message to the authors of OOSE re slide 20: Problem with BreuggeOOSE\content\lectures\ch10lect1.ppt We will discuss this at a later date. ======================================