Question: Question 1 - Object Orientated Programming ( 1 0 marks ) Create and save a macro - enabled workbook. Consider the following thick - walled

Question 1- Object Orientated Programming (10 marks)
Create and save a macro-enabled workbook.
Consider the following thick-walled cylindrical tube and its properties:
a.(5 marks)
Setup a worksheet with cells for user to enter values for r1,r2,h, and , the density of the material what the cylinder is made by. Also provide cells for cross section area (CSA), volume (V), mass (m), Area Moments of inertia about Z(IZ), Area Moments of inertia about x(Ix), Area Moments of inertia about Y(IY), which are to be calculated.
All units entered are assumed to be in mm.
Add a class module to your project named CylindricalTube.
Add public properties to the class for r1,r2,h, and , using appropriate data types.
Add methods to your class to calculate CSA, V,m,IZ,Ix, and IY which must be returned with a result based on the milli-meters unit.
1
Formula:
CSA =r22-r12
V=hr22-hr12
m=hr22-hr12
IZ=12m(r22+r12)
Ix=112m[3(r22+r12)+4h2]
IY=112m[3(r22+r12)+4h2]
b.(5 marks)
Add an Active-X or form button with caption "Calculate" to your worksheet which executes code using the CylindricalTube object. When clicked the code will create a new instance of the CylindricalTube object and assign values to the new object properties for r1,r2,h, and from the spreadsheet, then using methods, populate cells containing CSA, V,m,IZ,Ix, and IY.
Your worksheet should look something like this:
 Question 1- Object Orientated Programming (10 marks) Create and save a

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!