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
Sur cette page du site, vous pouvez voir la vidéo en ligne Homework 04 - Object-oriented programming: Encapsulation/Inheritance/Polymorphism durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Stefan Macke 29 avril 2024, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 419 fois et il a aimé 17 téléspectateurs. Bon visionnage!