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?
-
Why are S fusion and S vaporization always positive?
-
The listed pulse rates were obtained for the Third National Health and Nutrition Examination Survey conducted by the U.S. Department of Health and Human Services, National Center for Health...
-
Use Hesss law to calculate the standard heat of the water-gas shift reaction CO (g) + H 2 O (v) CO 2 (g) + H 2 (g) from each of the two sets of data given here. (a) CO (g) + H 2 O (l) CO 2 (g) + H...
-
Bank Reconciliation 1. What is it - It is a process that explains the difference between the bank balance shown in an organization's bank statement, as supplied by the bank, and the corresponding...
-
The file P02_07.xlsx includes data on 204 employees at the (fictional) company Beta Technologies. a. Estimate a multiple regression equation to explain the variation in employee salaries at Beta...
-
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...
-
Bad gums may mean a bad heart. Researchers discovered that 85% of people who have suffered a heart attack had periodontal disease, an inflammation of the gums. Only 29% of healthy people have this...
-
A business student has $3,500 available from a summer job and has identified three potential stocks in which to invest. The cost per share and expected return over the next two years are given in the...
-
You made a payment on your credit card from your checking account. You review the transactions in the Banking Center. What actions do you perform?
-
When 30.6 g of an unknown hydrocarbon is completely burned, 95.9 g of carbon dioxide (CO2) is recovered. A determination of the density of this hydrocarbon gives a value of 2.48 g/L at STP. What is...
-
Explain how to use behavioral targeting and placement targeting to maximize SEO.
-
ABC Corporation is subject to tax in California and no other state. Its federal taxable income is $1,200,000. Its federal depreciation is $200,000 but the state allows depreciation of $100,000. On...
-
An ideal inductor of inductance L is connected to an ac power supply, which provides an emf (t) = m sin w t. (a) Write an expression for the current in the inductor as a function of time. (b) What is...
-
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....
-
In 2002, Martha Stewart was accused of trading ImClone stock based on private (inside) information. The private information motivated her to sell the stock before it was publicly revealed that...
-
A project required 117,900 actual carpenter work hours, of which 15% were performed on an overtime basis. The carpenter's base pay was $27.50 per hour, and the total union fringes were $6.27 per...
-
In June of 2020, a music group, The Law Students, was scheduled to perform at the Forum Theatre in Metuchen, NJ. They arranged their schedule so that they would be sure to be in Metuchen on that date...
Study smarter with the SolutionInn App