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=1.8 required=5.0 tests=BAYES_50,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,29f311e5e4153888 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g47g2000cwa.googlegroups.com!not-for-mail From: "ramesh" Newsgroups: comp.lang.ada Subject: Re: need help with errors im getting Date: 25 Jun 2005 11:38:30 -0700 Organization: http://groups.google.com Message-ID: <1119724710.107186.139010@g47g2000cwa.googlegroups.com> References: <1119650372.546285.220190@z14g2000cwz.googlegroups.com> NNTP-Posting-Host: 158.135.0.59 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1119724715 27477 127.0.0.1 (25 Jun 2005 18:38:35 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 25 Jun 2005 18:38:35 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: g47g2000cwa.googlegroups.com; posting-host=158.135.0.59; posting-account=jaODIw0AAAAqz8a5fLvIQzGSVAOK2M7x Xref: g2news1.google.com comp.lang.ada:11650 Date: 2005-06-25T11:38:30-07:00 List-Id: Thank you jeff and Denis for your time to look at my code. Here is the specification on which Im working right now. Person --> Employee, Student, Citizen Here Person and Employee should be meta classes, and Employee, Student, Citizen must inherit from Person. Employee--->Faculty, Staff The specification team is not currently able to supply the desired level of detail. However, based on the available information, the design team has made the following decisions. You may make reasonable modifications to method parameter lists. You may also add additional data structures too class definitions. Person Employee Date Name DateHired: Date; Month Birthday: Date; Employee(n,dob,s,dh) Day Sex PrintDateHired() Year Person(n,dob, s) PrintName() Date() Date(mm,dd,yy) SetDate(mm, dd, yy) PrintDate() "Person" and "Employee" must be implemented as abstract (meta or virtual) classes! Note that Birthday and DateHired are imbedded, not inherited. Months are to take on the values January through December. The year field may only take on values from 1800 through 2050. Your code must enforce these abstractions at runtime. The day field must similarly be restricted to the values 1 through 31 (enforced at runtime). It is desirable to have two methods for creating dates: first a method which initializes the date to specified values at the time the date is created, and secondly a method that creates a date and initializes it to the default value January 1, 1970. Actually, management would be impressed if the default is obtained from the computer's clock. If you implement this option, mark the code clearly with a high lighter. The method SetDate may be used to change the current date. Sex should be restricted to the values "male" and "female." If you implement faculty, staff, students, and citizens as tasks, their body should consist of a loop where they wait for a call to any method. Respond to the method when called. Every T seconds, they should experience a time out where they state something of great importance prior to resumption of waiting, e.g., "task named XXX is bored." ------------------------------- Student class Major Classification EntryDate Student(n, dob, s, maj, cl, ed) PrintName() PrintMajor() SetMajor() SetClassification() PrintClassification() PrintAll() ------------------------------------------------------- Citizen class Hobby Citizen(n, dob, s) Citizen(n, dob, s, hobbyName) Citizen(n, dob, s, hobbyName, doh) PrintName() SetHobby() PrintHobby() PrintAll() Allowable majors include: Computer Science, Math, Business, Physics, Biology, and Chemistry. Classification may take on the values: Freshman, Sophomore, Junior, Senior, and GradStudent. The EntryDate for students is the date they first registered for school. Allowable hobbies include sail boarding, swimming, hiking, marbles, sky diving, acting, and none. If a hobby is not specified, the value of Hobby should default to "none" and the date the hobby started to January 1, 1970. Date objects --------------------------------------------------------- Faculty class MajorField Faculty(n, dob, s, hd, mf) PrintName() PrintHireDate() PrintMajorField() PrintAll() ------------------------------------------------------------ Staff class Hobby DateOfHobby // date the hobby started Staff(n, dob, s, hd, hobbyName, doh) PrintName() SetHobby() PrintHobby() PrintAll() --------------------------------------------------------------------- Date class Month Day Year CreateADate() CreateADate(M,D,Y) SetDate(M,D,Y) GetDate() GetMonth() GetDay() GetYear() Date should be implemented using embedding, not inheritance. You must be able to create a date supplying the month, day, and year. You must also be able to create a date with it defaulting to January 1, 1970. Days should be constrained to the range 1 through 31 and years to the range 1940 through 2020.