1 F.U.C.K Feeding Ungrateful Cats and KittensBy Katherine Callahan
2 F.U.C.K Cats, although adorable, can be annoying creatures that wake you up at very early hours of the morning to feed them This language would be used to dispense cat food and water into separate dishes This language could be used to feed your cat at certain preset times during the day or will use a weight based system to detect when the bowls are empty
3 Language Description Similar to C++, but implements things from Groovy to make assigning things simpler Lines do not need to end in a semicolon Variable names must start with a letter Language is case sensitive Left Associative
4 Input/Output Input: Output: Clock running on 24 hour timeScale to determine if dishes are empty Multiple trays for food storage Water piping hookup or bottle input Output: Dispensers for food and water
5 Functions DispenseFood() -Dispenses food for specified catDispenseWater() -Dispenses water for specified cat CheckEmpty() -Checks if bowl for food/water is empty SetFeedTime() -Sets times for food/water to be dispensed SetAmount() -Sets amount of food to be dispensed SetFoodType() -Sets type of food SetDish() -Sets dish for food/water to be dispensed to Main() -Main part of program
6 Syntax Variable Types: Reserved Words: Operators: int Empty doubleTrue False FoodType Dish FoodAmnt Time Variable Types: int double bool time CatName dish foodType Operators: & and || or increment by 1 decrement by 1 == is equals = equals : used in time variable >= greater than or equal to <= less than or equal to ~ comment
7 B.N.F.
8 B.N.F Continued
9 Sample Programs Main(){ time morning = 06:00 time night = 18:00 foodType cat = 1 dish sfood = 1 dish swater = 2 CatName Sugar = [FoodType: cat, Dish: sfood, FoodAmnt: 1.00] SetFeedTime(morning) SetFoodType(Sugar.FoodType) SetAmount(Sugar.FoodAmnt) SetDish(Sugar.Dish) DispenseFood(Sugar) DispenseWater(swater) SetFeedTime(night) }
10 Sample Programs (cont.)Main(){ time morning = 08:00 time night = 18:00 foodType cat = 1 foodType kitten = 2 dish cfood = 1 dish cwater = 2 dish sfood = 3 dish swater = 4 CatName Callie = [FoodType: cat, Dish: cfood, FoodAmnt: 0.66] Catname Spook = [FoodType: kitten, Dish: sfood, FoodAmnt: 0.75] SetFeedTime(morning) SetAmount(Callie.FoodAmnt) SetFoodType(Callie.FoodType) SetDish(Callie.Dish) DispenseFood(Callie) DispenseWater(cwater) SetAmount(Spook.FoodAmnt) SetFoodType(Spook.FoodType) SetDish(Spook.Dish) DispenseFood(Spook) DispenseWater(swater) SetFeedTime(night) }
11 Sample Programs(cont.)Main(){ foodType kitten = 1 dish wfood = 1 dish wwater = 2 CatName Watson = [FoodType: kitten, Dish: wfood, FoodAmnt: 1] SetAmount(Watson.FoodAmnt) SetFoodType(Watson.FoodType) SetDish(Watson.Dish) while(true){ if(CheckEmpty(wwater) == true){ DispenseWater(wwater)} ~Will dispense water whenever it is empty if(Time >= 06:00 & Time <= 12:00 & CheckEmpty(wfood) == true){ DispenseFood(Watson)} if(Time >= 18:00 & Time <= 00:00 & CheckEmpty(wfood) == true){ }
12