Write the statement that would be used in the main program to set the length of the
Question:
Write the statement that would be used in the main program to set the length of the side of MyRectangle equal to 15 and the height equal to 25.
Transcribed Image Text:
Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End Constructor Public Subprogram SetSide (NewSide) Set Side = NewSide End Subprogram Public Subprogram ComputeArea () Set Area = Side^2 %3! End Subprogram Public Function GetArea() As Float Set GetArea = Area End Function Public Function GetSide () As Float Set GetSide = Side End Function End Class Class Rectangle Extends Square Declare Private Height As Float Public Rectangle() Call Square () Set Height = 1.0 %3! End Constructor Public Subprogram SetHeight (NewHeight) Set Height = NewHeight End Subprogram Public Function GetHeight() As Float Set GetHeight = Height End Function Public Subprogram ComputeArea () Set Area = Side * Height End Subprogram End Class
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 44% (9 reviews)
Answered By
Muhammad Khurram
I have strong General Management skills to apply in your projects. Over last 3 years, I have acquired great knowledge of Accounting, Auditing, Microsoft Excel, Microsoft PowerPoint, Finance, Microsoft Project, Taxation, Strategic Management, Human Resource, Financial Planning, Business Planning, Microsoft Word, International Business, Entrepreneurship, General Management, Business Mathematics, Advertising, Marketing, Supply Chain, and E-commerce. I can guarantee professional services with accuracy.
4.80+
249+ Reviews
407+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
Determine the critical values that would be used in testing each of the following null hypotheses using the classical approach. Ho: Ho: Ho: 0 vs. Ha: 0, with n 18 and 0 vs. Ha: > 0, with n 32...
-
a. Measure all the voltages and currents indicated. - Note that elements are connected in parallel. Follow best practices covered in the lecture for parallel connection of elements to one point. b....
-
Determine the test criteria that would be used to test the following hypotheses when z is used as the test statistic and the classical approach is used. Hop 0.5 and Ha: p > 0.5, with 0.05 Ho:p = 0.5...
-
Prove that, the area of the traverse is equal to the algebraic sum of the products of the total latitude of each point and algebraic sum of the departures of the lines meeting at that point.
-
What is the price elasticity of demand, and why is it important?
-
How does a project manager determine how complex to make a program plan or how many schedules to include?
-
A business sells an asset on 1 January for 12,000. The asset was bought exactly two years previously for 24,000 and depreciation was charged over five years on the straight line method, assuming no...
-
A local symphony association offers memberships as follows: Continuing membership, per year $ 15 Patron lifetime membership 375 The patron membership has been based on the symphony association's...
-
Find the volume of the solid under the graph of f(x,y) over the region R bounded by the graphs of the indicated equations. Sketch the region R. The solid does not have to be sketched f(x,y) 11-x-y; R...
-
A single-phase motor takes 8.3 A at a power factor of 0.866 lagging when connected to a 230 V, 50 Hz supply. Two similar capacitors are connected in parallel with each other to form a capacitance...
-
Create an instance of the class, Rectangle and reference it with the name MyRectangle. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End...
-
Write the statement that would be used in the main program to compute the area of MyRectangle. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End...
-
What property is exempt from a landlords right to distrain?
-
If Blossom Ink, Inc. has net sales of $ 3 7 5 0 0 0 and cost of goods sold of $ 3 0 3 7 5 0 , the company\'s gross profit rate is 2 3 % . 1 9 % . 1 0 0 % . 8 1 % .
-
Recent Merger and Acquisition (M&A) Activities, Evaluate the effect of interest rates and time value of money by presenting a summary of recent M&A activities for Verizon & A&Ts. Summary should...
-
A risk-free, zero-coupon bond with a face value of $5,000 has 10 years to maturity. If the YTM is 4.5%, what price is this bond will trade at?
-
2 2 . Where do you enter the employee default deductions? 2 3 . What linked accounts must you set up for import duties? 2 4 . How does historical payroll information affect the employees T 4 ? 2 5 ....
-
Gwen is a real estate agent, and she knows that she will have some good years and some bad years. She figures that half the time she'll earn $90,000 per year, and half the time she'll earn $20,000...
-
Describe the importance of effective communication during a crisis.
-
Chapter 9 Stock Valuation at Ragan Engines Input area: Shares owned by each sibling Ragan EPS Dividend to each sibling Ragan ROE Ragan required return Blue Ribband Motors Corp. Bon Voyage Marine,...
-
In Chapter 1, we mentioned that the TCP/IP suite, unlike the OSI model, has no session layer. But an application-layer protocol can include some of the features defined in this layer if needed. Does...
-
Are the HELO and MAIL FROM commands both necessary in SMTP? Why or why not?
-
In Chapter 1, we mentioned that the TCP/IP suite, unlike the OSI model, has no presentation layer. But an application-layer protocol can include some of the features defined in this layer if needed....
-
You have just been hired by FAB Corporation, the manufacturer of a revolutionary new garage door opening device. The president has asked that you review the company's costing system and "do what you...
-
Mercedes, Company has the following quarterly financial information. Sales Revenue Cost of Goods Sold Operating Expenses Interest Expense Income Tax Expense Average Number of Common Shares...
-
Assets Current Assets Cash Receivables Short-term investments Inventory Prepaid expenses Fixed Assets Land, building, and x equipment at cost Less accumulated depreciation Long-term investments...
Study smarter with the SolutionInn App