Exercise 1: Time to Go Shopping!
In this lesson, you have to make a class called Product and implement various methods in it.
Problem Statement
A class named Product
is given below. You need to define the following in it:
- The class
constructor
that takes the following as parameters in the exact order:_name
: the name of the product._price
: the price of the product in dollars._amount
: the amount of that product available._madeIn
: the country the
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy