Question: 2 Qy) Write a Program to make a Pencil that has the following features: Colour (sting), length (double), diameter (double), Price (dubble) and nextID) (static
2 Qy) Write a Program to make a Pencil that has the following features: Colour (sting), length (double), diameter (double), Price (dubble) and nextID) (static int). The Program can set and Vetarm the Pfice of the pencil using access methads. Write an appropriate test class to allow a user to enter data and test she Program. Make sure that a Variable of an object connot be accessed by a Code oriside of the object
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
