Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Summer Camp Project: Organizing and Managing Camp Activities and Resources, Study Guides, Projects, Research of Computer Science

A project for creating a summer camp system, which includes managing inputs such as child and counselor information, camp location and days open, barracks occupancy, and number of kids participating in activities. The system also includes outputs like canoes needed, vacancy in cafeteria, and whether children are of the correct age. The document defines classes for summercamp, activity, baseballactivity, canoeactivity, cafeteria, campgroup, child, barracks, counselorteam, counselor, meal, and table.

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 09/17/2009

koofers-user-ex9
koofers-user-ex9 🇺🇸

10 documents

1 / 8

Toggle sidebar

Related documents


Partial preview of the text

Download Summer Camp Project: Organizing and Managing Camp Activities and Resources and more Study Guides, Projects, Research Computer Science in PDF only on Docsity! Child ty Camp Group. Meal Table —— Barracies Cafeteria Sa a SummerCamp Activity Fo. CounselorTeam Canoe Activity BaseballActivity SA Counselor Project 0 - Summer Camp Inputs: child info (age, name, gender), counselor info (age, name, gender), camp info (location, days open), barracks info (max occupancy, name, location), number of kids eating at cafeteria, number of kids participating in activity. CounselorTeams for activities, field location, river location Outputs: canoes needed, canoes available(Boolean), number in campgroup that have beds, days until camp is closed, winner of baseball game, children in camp group are of the correct age(Boolean), vacancy in cafeteria, whether the tables are clean, how many are boarded in the barracks, average age of counselors in the team. Whether the counselors in a team are the same sex, ratio of counselors age to experience, whether a child is boarded, number of years until 18th birthday, cooking time for a meal Assumptions: days passed given by user <= daysOpen, user gives good data, 4 kids for each canoe, 30 sec cooking time for each diner, winner of baseball game randomly decided, 1 child takes up one bed, one child eats one meal Constraints: occupancy of cafeteria = 100, 3 counselors per team. 5 children per campgroup, child can only have one gender (m or f), age of child < 18, age and experience for counselors > 0 Relationships: SummerCamp has Cafeteria, Barracks, 2 CampGroups, 1 CounselorTeam, 2 Activities. Activity has a CounselorTeam BaseballActivity and CanoeActiviy extend activity Cafeteria has meal and Table CampGroup has CounselorTeam and 5 children CounselorTeam has 3 counselors Invariants: daysUntilClose <= daysOpen, seats available in cafeteria >= 0, numberBoard is < 6 and >= 0 Pre Conditions: both baseball teams arent the same, number of participants in start canoe activity >= 0, vacancy must be assigned to cafeteria to calculate seatsAvailable Vacancy > 0 in order to addDiner, child is less than 18, vacancy for barracks > 0 for assignBed, ages of counselors must be >= 0, numberOfKids for cookingTime > 0, table must be clean to call useTable, table must be dirty to call cleanTable Post Conditions: yearsUntil18 < 18 and > 0, number boarded <= occupancy, aveAge > lowest age and < highest age, end activity returns properties to null, age:ex ratio > 0, cooking time increases as kids eating increases, table is dirty after useTable, table is clean after cleanTable Cafeteria <<attributes>> + cooks: CounselorTeam + meal: Meal + table: Table + vacancy: int <<constructor>> + Cafeteria() <<set methods>> + toString(): String + setMeal(meal: Meal): void + setCooks(cooks: CounselorTeam): void + setVacancy(vacancy: int): void <<methods>> + addDiner(): void + seatsAvailable(): int + tableClean(): boolean CampGroup <<attributes>> + child1: Child + child2: Child + child3: Child + child4: Child + child5: Child + groupName: String + ageGroup: int + counselors: CounselorTeam <<constructor>> + CampGroup() <<set methods>> + toString(): String + setGroup(child1: Child, child2: Child, child3: Child, child4: Child, child5: Child): void + setName(groupName: String): void + setAge(age: int): void + setCounselors(counselors: CounselorTeam):void <<methods>> + calcNumberBoarded(): int + appropriateAges(): boolean Child <<attributes>> + name: String + age: int + gender: char + boarded: boolean <<constructor>> + Child() + Child(name: String, age: int, gender: char):void <<set methods>> + toString(): String + setName(name: String): void + setAge(age: int): void + setGender(gender: char): void + setBoarded(boarded: boolean): void <<methods>> + areYouBoarded(): Boolean + yearsUntil18(): int Barracks <<attributes>> + location: String + dormName: String + occupancy: int + vacancy: int <<constructor>> + Barracks() <<set methods>> + toString(): String + setLocation(location: String): void + setDormName(dormName: String): void + setOcc(occupancy: int): void <<methods>> + assignBed(sleeper: Child):void + calcNumBoarded(): int <<constructor>> + CounselorTeam() <<set methods>> + setTeam(member1: Counselor, member2, Counselor, member3: Counselor): void + setName(teamName: String): void + toString(): String <<methods>> + aveAge(): double + sameSex(): boolean <<constructor>> + Counselor() + Counselor(name: String, age: int, gender: char) <<set methods>> + setName(name: String): void + setAge(age: int): void + setGender(gender: char): void + setEx(experience: int): void + toString(): String <<methods>> + ageToExRatio(): double CounselorTeam <<attributes>> + member1: Counselor + member2: Counselor + member3: Counselor + teamName: String Counselor <<attributes>> + name: String + age: int + gender: char + yearsExperience: int
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved