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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!