Your homework:
Add an enum called "CoffeeType" to your project with values for COFFEE, CAPPUCCINO, and ESPRESSO.
Change the data type of "CoffeeType" in the CoffeeMachine class from String to CoffeeType and correct any compile errors.
Add a getName() method to the CoffeeType enum that returns the names with a capital letter, as before.
----
00:00 Introduction
00:29 Current Status
00:50 Creating the CoffeeType enum
01:15 Replacing the string with the enum
02:10 Replacing arguments with enum values
03:21 The getName() method in CoffeeType
In questa pagina del sito puoi guardare il video online Homework 04 - Object-oriented programming: Encapsulation/Inheritance/Polymorphism della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Stefan Macke 29 aprile 2024, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 419 volte e gli è piaciuto 17 spettatori. Buona visione!