Challenge 2: Calling a Constructor from a Constructor
Can you call a constructor from another constructor? A solution is placed in the "show solution" section to help you, but we would suggest you try to solve it on your own first.
We'll cover the following...
We'll cover the following...
Problem Statement
A class can have multiple parameterized constructors which can call each other.
You are given a partially completed code of a VendingMachine
class in the editor. Implement a new parametrized constructor by making use of ...