Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please try to solve this using only the methods from the first (beginner) CSS java course (e.g like for loops, arrays, if statements, and the

image text in transcribed

Please try to solve this using only the methods from the first (beginner) CSS java course (e.g like for loops, arrays, if statements, and the like.) And please try to keep it simple, making sure not to use advanced methods beyond the CSS 1 course. I am still trying to learn the basics and won't understand very complicated methods if used. I want to be able to follow the code and understand it better.

Thank you!

Design Brief: Use Case Scenario You are hired to develop a program for a client who described what he wants using the following cenario Using Multiple Classes: Build and use more than one class in your project. Arrays: Make use of an Array in your software, and track its current number of live elements with an int Exception Handling with Try/Catch blocks: Add try/catch blocks to your code around possibly problematic code sections, and catch and report problems as they occur (ie, FileNotFoundException). 6. 7. like to drink a beverage every morning. This might be a cup of coffee or tea. If it is coffee, I like to choose (based on wake up time) b/w espresso (short or long) or latte with one or two shots of espresso, no foam, and extra hot. If it is tea, I like to have either green or black tea; the latter can be with lemon or with half and half and sugar, depending of the kind of tea. I have a large collection of coffee and 8. 9. Class Design using Composition: Build a class that makes use of other preexisting classes. Your new class will "house (or contain) the existing classes much like the AlarmClock Class contained tea capsules and my beverage machine could be programmed (in Java) to make a drink at the specified time. 10. Class Design using Access Modifiers: Make all class-wide instance variables private in your class, 11. Multi-Dimensional Arrays: Make use of any array with a dimensionality greater than one (sede 12. GUIs & Graphics (pick any one of the following multiple (inner) Time objects and provide "getters and "setters to get and set the data accordingly the tic-tac-toe example). -I would like to have a program which will allow me to set up at evening my coming morning drink. Sometimes, I order my beverage from my neighborhood coffee shop specifying a pick up time." Specifications You manager and you agreed on the following specs on what the solution will look like: Design specs a. Use JOptionPane for message dialogs, input dialogs, etc. b. Build a Window like we did in class by using or extending a JFrame. c. Extend a JPanel and override its paint function for 2D rendering. d. nclude some widgets like JButtons, JTextAreas, JComboboxes, etc "Interactive: ask for options using UI (keyboard/Scanner or speech recognition-))and print out (screen) the choice Store data in files (read from; write to, etc.) Modular: use several classes and various methods (x2 points Use test cases (aka have a driver/main) 13. Class Design using Inheritance: Since we've only hinted at this with our discussion, how might " you accomplish this goal? ' Notes Implementation specs .Reuse, reuse, reusel Can you accomplish multiple goals simultaneously? For example, doesn't Define preconditions and postconditions " Handle exceptions " Use default values for your variables " Use arrays (many kinds of coffee, tea, milk,...) for your data " Comment and Document reading input from a file accomplish both File I0 and Looping with Repetition Control Structures Look in the code examples for comments and further hints-they are the key to making this assignment as simple or as complex as you like. CSS 161 Requirements You are required to demonstrate 6 of the following features in your software program. Step 1: File IO Choose an item above (say, File IO) and work on just that here. writing output to a file before moving on. Focus on just getting input from a file or 1. Functional Decomposition: Use functions to break up a large program into meaningful chunks, 2. Looping with Repetition Control Structures: Use two of the following structures (for, while, 3. Nested Loops: Use a loop within a loop in your program (see tic-tac-toe example). Note that 4. Branching with Selection Control Structures: Use both an if/else and a switch statement in your 5. File IO: Read from or write to a file in your software. Examples of this include be reading in a using input to and output from those functions where appropriate do/while, for each). this is automatically accomplished when using Multi-Dimensional Arrays code Step 2: Using Arrays Select a second objective (say, using arrays) and work on only that in this step. goals, focus on simply declaring, using, and outputting results from your array lenoring your other Step 3,4,5,.. Rinse, Refine&Repeat Select and work on only one goal at a time, taking small steps (and not giant leaps) as you progress. Make sure you're done with and have tested the current step before proceeding to the next. preset pattern for the computer opponent's answers in a game of rock/paper/scissors, or writing a file that logs each move the player makes, effectively recording a history of the game. Design Brief: Use Case Scenario You are hired to develop a program for a client who described what he wants using the following cenario Using Multiple Classes: Build and use more than one class in your project. Arrays: Make use of an Array in your software, and track its current number of live elements with an int Exception Handling with Try/Catch blocks: Add try/catch blocks to your code around possibly problematic code sections, and catch and report problems as they occur (ie, FileNotFoundException). 6. 7. like to drink a beverage every morning. This might be a cup of coffee or tea. If it is coffee, I like to choose (based on wake up time) b/w espresso (short or long) or latte with one or two shots of espresso, no foam, and extra hot. If it is tea, I like to have either green or black tea; the latter can be with lemon or with half and half and sugar, depending of the kind of tea. I have a large collection of coffee and 8. 9. Class Design using Composition: Build a class that makes use of other preexisting classes. Your new class will "house (or contain) the existing classes much like the AlarmClock Class contained tea capsules and my beverage machine could be programmed (in Java) to make a drink at the specified time. 10. Class Design using Access Modifiers: Make all class-wide instance variables private in your class, 11. Multi-Dimensional Arrays: Make use of any array with a dimensionality greater than one (sede 12. GUIs & Graphics (pick any one of the following multiple (inner) Time objects and provide "getters and "setters to get and set the data accordingly the tic-tac-toe example). -I would like to have a program which will allow me to set up at evening my coming morning drink. Sometimes, I order my beverage from my neighborhood coffee shop specifying a pick up time." Specifications You manager and you agreed on the following specs on what the solution will look like: Design specs a. Use JOptionPane for message dialogs, input dialogs, etc. b. Build a Window like we did in class by using or extending a JFrame. c. Extend a JPanel and override its paint function for 2D rendering. d. nclude some widgets like JButtons, JTextAreas, JComboboxes, etc "Interactive: ask for options using UI (keyboard/Scanner or speech recognition-))and print out (screen) the choice Store data in files (read from; write to, etc.) Modular: use several classes and various methods (x2 points Use test cases (aka have a driver/main) 13. Class Design using Inheritance: Since we've only hinted at this with our discussion, how might " you accomplish this goal? ' Notes Implementation specs .Reuse, reuse, reusel Can you accomplish multiple goals simultaneously? For example, doesn't Define preconditions and postconditions " Handle exceptions " Use default values for your variables " Use arrays (many kinds of coffee, tea, milk,...) for your data " Comment and Document reading input from a file accomplish both File I0 and Looping with Repetition Control Structures Look in the code examples for comments and further hints-they are the key to making this assignment as simple or as complex as you like. CSS 161 Requirements You are required to demonstrate 6 of the following features in your software program. Step 1: File IO Choose an item above (say, File IO) and work on just that here. writing output to a file before moving on. Focus on just getting input from a file or 1. Functional Decomposition: Use functions to break up a large program into meaningful chunks, 2. Looping with Repetition Control Structures: Use two of the following structures (for, while, 3. Nested Loops: Use a loop within a loop in your program (see tic-tac-toe example). Note that 4. Branching with Selection Control Structures: Use both an if/else and a switch statement in your 5. File IO: Read from or write to a file in your software. Examples of this include be reading in a using input to and output from those functions where appropriate do/while, for each). this is automatically accomplished when using Multi-Dimensional Arrays code Step 2: Using Arrays Select a second objective (say, using arrays) and work on only that in this step. goals, focus on simply declaring, using, and outputting results from your array lenoring your other Step 3,4,5,.. Rinse, Refine&Repeat Select and work on only one goal at a time, taking small steps (and not giant leaps) as you progress. Make sure you're done with and have tested the current step before proceeding to the next. preset pattern for the computer opponent's answers in a game of rock/paper/scissors, or writing a file that logs each move the player makes, effectively recording a history of the game

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions