Class: DecorItem

DecorItem(id, name, price, image, material)

Class representing a decorative shop item (e.g., ribbon, vase).

Constructor

new DecorItem(id, name, price, image, material)

Creates an instance of DecorItem.

Parameters:
Name Type Description
id number

ID.

name string

Name.

price number

Price.

image string

Image path.

material string

The primary material of the item.

Source:

Extends

Classes

DecorItem
ShopItem

Methods

getDescription() → {string}

Returns a detailed description.

Overrides:
Source:
Returns:

Description indicating the material.

Type
string

getId() → {number}

Gets the unique ID of the item.

Overrides:
Source:
Returns:

The item's ID.

Type
number

isPricy() → {boolean}

Checks if the item is expensive (price > 100).

Overrides:
Source:
Returns:

True if the price is above 100.

Type
boolean