Java Please code the following, and please don't forget any of the parts. Also, please comment your code so that I can u

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Java Please code the following, and please don't forget any of the parts. Also, please comment your code so that I can u

Post by answerhappygod »

Java
Please code the following, and please don't forget any of the
parts. Also, please comment your code so
that I can understand your logic, this is very important. I will
give upvotes.
Design Brief:
Use Case Scenario You are hired to develop a program for a
client who described what he wants using the following scenario: “I
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 latte 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 tea capsules and my beverage machine could
be programmed (in Java) to make a drink at the specified time.
- 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 Your manager and you agreed on the following
specs on what the solution will look like:
Design
specs( REQUIRED)
▪ 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
▪ Use test cases (aka have a driver / main)
Implementation specs (REQUIRED)
▪ Define preconditions and post conditions
▪ Handle exceptions
▪ Use default values for your variables
▪ Use arrays (many kinds of coffee, tea, milk, …) for your
data
▪ Comment and Document
You are required to demonstrate the following features
in your software program
1. Looping with Repetition Control Structures: Use two of the
following structures {for, while, do/while, for each}.
2. Branching with Selection Control Structures: Use both an
if/else and a switch statement in your code.
3. Using Multiple Classes: Build and use more than one class in
your project.
4. Arrays:Make use of an Array in your software,and track its
current number of live elements with anint.
5. 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. Class Design using Access Modifiers: Make all class-wide
instance variables private in your class, and provide “getters” and
“setters” to get and set the data accordingly
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply