Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question

Write using beginner level JAVA!!!!

▪Create Sourdough subclass

  • Unique Instance variable: lactic acid
  • Constructors, getters, setters
    • create 2 constructors – each utilizes the correct constructor
    • for the default constructor, it is “1 tbs” of lactic acid and use “Sourdough” for breadName, the rest stay the same.
    • create the getter and setter for the one unique attrib
  • getUniqueIngredients returns a String showing the amount required for each unique attribute (hint: return this.lacticAcid + "something";)
  • toString --- looks something like

 

Sourdough Bread Ingredients

5 cups of flour1.5 cups of water2.0 tbs of salt2.0 tbs of yeast       // unique ingreds go after this line1 tbs lactic acid     This bread is baked //This could be not baked

 

▪Create Tortilla subclass

–Unique Instance variables: masa

  • Constructors, getters, setters
    • create 2 constructors – each utilizes the correct constructor
    • for the default constructor, it is “3.5 cups” of masa, use “Tortilla” for breadName, use “1 cup” for flour, the rest stay the same.
    • create the getter and setter for the one unique attrib
  • getUniqueIngredients returns a String showing the amount required for each unique attribute (hint: return this.masa + "something";)
  • override the bake() method. Only change the baked value if masa is “3.5 cups”
  • toString --- looks something like

 

Tortilla Ingredients

1 cup of flour

1.5 cups of water

2.0 tbs of salt

2.0 tbs of yeast

3.5 cups of masa

This Tortilla is not baked

 

 

You MUST utilize inheritance and reuse

Hint: attributes in superclasses should be protected, subclasses should be private

Hint: note where the keyword abstract is used.

 

I will supply a BreadTester – when you run it this is the results you should get:

Sourdough Ingredients

5 cups of flour

1.5 cups of water

2.0 tbs of salt

2.0 tbs of yeast

1 tbs of lactic acid

This Sourdough is baked ßNOTE – the bake method I called in line 25 in the Tester should have executed the bake method in Sourdough. There is no override in Sourdough, so the bake method in Bread code should run and should change this one from false to true!!

 

Tortilla Ingredients

1 cup of flour

1.5 cups of water

2.0 tbs of salt

2.0 tbs of yeast

3.5 cups of masa

This Tortilla is baked ßNOTE – the bake method override in Tortilla should change this one!!

 

Abuela's Tortillas Ingredients

4 cups of flour

2.5 cups of water

1 tsp of salt

3 tsp of yeast

2.75 cups of masa

This Abuela's Tortillas is not baked

 

Low Lactic Sourdough Ingredients

2 cups of flour

1.5 cups of water

3 tsp of salt

1 tsp of yeast

.05 tsp of lactic acid

This Low Lactic Sourdough is baked

 

Mama's Sourdough Ingredients

2 cups of flour

1.5 cups of water

3 tsp of salt

1 tsp of yeast

2 tbs of lactic acid

This Mama's Sourdough is baked ßNOTE – the bake method in Bread should change this one from false to true because Sourdough does not override the method!!

 

 

Low Salt Tortilla Ingredients

.5 cups of flour

1.5 cups of water

.05 tsp of salt

1 tsp of yeast

6.3 cups of masa

This Low Salt Tortilla is baked

Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education