Which line of code properly declares the clothingItem class such that it inherits from Item?

Cloud Kicks has a class to represent items for sale in an online store, as shown below:
Class Item{ constructor (name, price){ this.name = name; this.price = price;
} formattedPrice(){ return ‘s’ + String(this.price);}} A new business requirement comes in that requests a ClothingItem class that should have all of the properties and methods of the Item class but will also have properties that are specific to clothes.
Which line of code properly declares the clothingItem class such that it inherits from Item?
A. Class ClothingItem implements Item{
B. Class ClothingItem {
C. Class ClothingItem super Item {
D. Class ClothingItem extends Item {

Download Printable PDF. VALID exam to help you PASS.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.