Preview of bryanjw/Drinks

bryanjw/Drinks

Create an application that demonstrates your object orientated skills and that follows normal coding standards as you understand them (e.g. naming conventions etc.). The application should display information about three drink types. The three drink types should be beer, juice and soda derived from a common drink object that has base properties that indicate the drink name, whether it is carbonated and a calculated description of the drink. The juice derived type should have a string property that indicates the fruit the juice it is made from, and the beer should have a property that indicates the alcohol content. The description should be overridden in each type so that for a soda it includes the soda name and if it is carbonated, a juice should also include the fruit name, a beer should add the alcohol content. When the application starts add 3 drink instances to a list or array, one should be Orange Juice of type juice (not carbonated, made from oranges), one should be Budweiser of type beer (carbonated, 5% alcohol) and the third should be Pepsi of type soda (carbonated). Then loop through the list/array and output the description of all 3 drinks, I expect it to display something like: “Orange Juice, not carbonated, made from oranges. Budweiser, carbonated, 5%. Pepsi, carbonated.”

★ 0 Stars
⑂ 0 Forks
○ 0 Watchers
✖ 0 Issues
Java

Last push:

Created:

Loading additional information…