Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bell-kevin/baseballparksales
Simulate sales by the vendors in the stands at a baseball park. They walk around selling hot dogs, bottles of soda, team-logo ball caps, and balloons, in this simulation. These items are 2 categories of inventory -- food and souvenirs. Food items have a 10% tax. Souvenir items have a 5% tax. Also, it is possible to get volume discounts on souvenir items. There are 2 discounts available -- if you buy more than 15 items, the discount rate is 15%; if you buy more than 8 items, the discount rate is 5%. Notice these discounts are to the sale of each item, before any sales tax is applied. When the sale qualifies for a discount, print a message with the discount rate
https://github.com/bell-kevin/baseballparksales
baseball dynamic-binding encapsulation inheritance object-oriented-programming polymorphism
Last synced: 29 days ago
JSON representation
Simulate sales by the vendors in the stands at a baseball park. They walk around selling hot dogs, bottles of soda, team-logo ball caps, and balloons, in this simulation. These items are 2 categories of inventory -- food and souvenirs. Food items have a 10% tax. Souvenir items have a 5% tax. Also, it is possible to get volume discounts on souvenir items. There are 2 discounts available -- if you buy more than 15 items, the discount rate is 15%; if you buy more than 8 items, the discount rate is 5%. Notice these discounts are to the sale of each item, before any sales tax is applied. When the sale qualifies for a discount, print a message with the discount rate
- Host: GitHub
- URL: https://github.com/bell-kevin/baseballparksales
- Owner: bell-kevin
- License: agpl-3.0
- Created: 2022-09-07T16:16:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-09T15:13:15.000Z (over 2 years ago)
- Last Synced: 2024-05-02T04:15:55.253Z (8 months ago)
- Topics: baseball, dynamic-binding, encapsulation, inheritance, object-oriented-programming, polymorphism
- Language: Java
- Homepage:
- Size: 259 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0