P4L2 Coffee Maker Exercise

.pdf

School

Georgia Institute Of Technology *

*We aren’t endorsed by this school

Course

6310

Subject

Computer Science

Date

Oct 30, 2023

Type

pdf

Pages

11

Uploaded by SuperElkMaster712

Status Robert Martin's Coffee Maker e In the course so far, we have looked at analyzing problems, . Texh.Jal description of the modeling them in UML, and functions of 3 coffee maker designing architectura solutions Description of an APl to control the coffee maker Use the APl and the textual X analysis technique we used at objects the start of the semester, design 38 set of OO classes to control the coffee maker e Now we want to look at the actua process of designing e To get started, we wil do an exercise from Robert Martin that involves designing software ¢ Express your answer in the form to control 38 coffee maker of 8 UML class-model diagram) The Mark IV Special Coffee Maker The Mark IV Special makes up to 12 cups of coffee at 3 time. The user places a fiter in the fiter holder, fils the fiter with coffee grounds, and slides the filter holder into its receptacle. The user then pours up to 12 cups of water into the water strainer and presses the Brew button. The water is heated until boling. The pressure of the evolving steam forces the water to be sprayed over the coffee grounds, and coffee drips through the filter into the pot. The pot is kept warm for extended periods by a warmer plate, which only turns on if there is coffee in the pot. If the pot is removed from the warmer plate whie water is being sprayed over the grounds, the flow of water is stopped so that brewed coffee does not spil on the warmer plate. Filtker (and receptacie ), water Sf\rodnc.(/ \or(,w \ou'H‘or\’ WAarmel” ? \ote
V\ufi\r\cg elem, Eor boiler / enSorS Pressure relief vadve Hardware e The written problem description leaves out some detalils e Add three more hardware elements: 1. Indicator light for when the brewing cycle is over 2. Sensor for the boiler, which determines whether there is water present to be boied 3. A pressure-relief valve for the boiler Hardware Design e Fortunately, the hardware team has taken care of that task, and we have been given 38 Java APl for the hardware e The APl is available to you from the class Resources page. e Note that Martin wrote this example before enums were 3dded to the Java language.
Two Approaches » Object-oriented analysis e Martin contrasts this gpproach to one in which behavior is central e Begin with OOA The traditional OOA agpproach to doing modeling is to search for nouns (or noun phrases) in the problem statement and model them with classes. Do this now on the textua description of the coffee maker, producing a list of nouns (or noun phrases). Write your answer in the text box: o K ’X_\] SQLC,‘\OJ, CU?5| 'Fi\'*fif, Usel V holder rLCLP*O\Q\L wost s&ro;.ncrl Coffee cyounds' ?0‘|/ WO~ et ?\OAL , \or‘c,vd \a Jtton , SensSors Class Model Diagram Martin's original class model I CoffeeMaker I diagram based on OOA | | WarmerPiate | * | Button | | Light | | j | BoilerSensor | | BoilerHeater | | PlateHeater | | PlateSensor | \/ {>| Sensor |< }
voel Presoes " Brew e o WaAcL( no AoV ( fiker aet i recptacte) - Vel LmoveS /?\“C”'S ?°+ voer s wedrer receprocle Let's look at the first use case: user presses the brew button, and play through what happens. First off, which of the three classes receives this event from the hardware interface? O Containment Vessel O Hot Water Source @ User Interface Collaboration Diagra User Pushes Brew Button I 1. IsReady User Interface | ;| Hot Water Source | 3: Start 2: IsReady h 4 Containment Vessel
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help

Browse Popular Homework Q&A

Q: Batting Averages Random samples of batting averages from the leaders in both leagues prior to the…
Q: In a study of the accuracy of fast food​ drive-through orders, Restaurant A had 348 accurate orders…
Q: Write the Java code to convert Celsius to Fahrenheit. Here is the conversion formula: (C x 9/5) + 32…
Q: (1) One of your professor's cats has knocked a glass of water onto the paper she's using to set up…
Q: PROBLEM 9 Suppose that women who live beyond the age of 80 outnumber to one. How much information,…
Q: If another professor pitches in just to help the second professor in the original arrangement, how…
Q: the magnitude of its angular velocity vector? Submit Answer Tries 0/2 What is the direction of its…
Q: determine the osmotic pressure of a solution that contains 0.034 g of a hydrocarbon solute (molar…
Q: Given the point with Cartesian coordinates, (3, –3), find the polar coordinates of the point. Select…
Q: Consider you are given a data file with the following text: FirstName LastName, 25 You are just…
Q: ОН A B
Q: QUESTION 2 In a typical member of Polypodiopsida, the O antheridia and archegonia are both formed on…
Q: Use an Addition or Subtraction Formula to write the expression as a trigonometric function of one…
Q: The nonvolatile, nonelectrolyte urea CH4N2O, (60.10 g/mol), is soluble in water H2O,. Calculate the…
Q: Which of the following are solutions to the following equation where 0 ≤ 0 < 2π 2 sin(30) = 1 Select…
Q: • Create a JavaFX application that displays the following window: ~ 3 4 5 Array And shows the array…
Q: Solve the inequality x- 2xs3. Graph the solution set. The solution set is (Type your answer in…
Q: Evaluate S (xy + x + 2) ds along the curve r(t) = 2ti + tj + (3 - 2t)k, Osts 1.
Q: Cyclist! A cyclist starts from rest and pedals such that the wheels of his bike have a constant…
Q: The enthalpy of vaporization for methanol is 35.2 kJ/mol. Methanol has a vapor pressure of 1 atm at…
Q: For the truss below, find the forces in members BC,ED, and FG What are the forces in CB, DE, and GF?…
Q: Exhibit 15-33 In a regression model involving 44 observations, the following estimated regression…