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 MySquare equal to 20.
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: 35% (14 reviews)
Answered By
Joseph Mwaura
I have been teaching college students in various subjects for 9 years now. Besides, I have been tutoring online with several tutoring companies from 2010 to date. The 9 years of experience as a tutor has enabled me to develop multiple tutoring skills and see thousands of students excel in their education and in life after school which gives me much pleasure. I have assisted students in essay writing and in doing academic research and this has helped me be well versed with the various writing styles such as APA, MLA, Chicago/ Turabian, Harvard. I am always ready to handle work at any hour and in any way as students specify. In my tutoring journey, excellence has always been my guiding standard.
4.00+
1+ Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
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 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...
-
Determine the bounds on the p-value that would be used in testing each of the following null hypotheses using the p-value approach: Ho: Ho: Ho: 0 vs. Ha: 0, with n :-32 and r 0.41 0 vs. Ha: > 0,...
-
If the interest rate on debt is lower than ROA, then a firm will Valitse yksi: a. increase ROE b. not change ROE c. none of these is correct d. decrease ROE e. change the ROE in an indeterminable...
-
List several operating strategies for hedging operating risk. What are the advantages and disadvantages of these hedges compared to financial market hedges?
-
Decision Analysis: Myka would like to maintain a 50% gross profit to cover AVS's administrative expenses of US$125,000 and target a 15% net profit. What should the target cost per case be in order to...
-
How do full-cost accounting and full-cost pricing differ? Are they related?
-
The inventory and sales data for this year for G. Rabbit Company are as follows: Required Using the above data from G. Rabbit Company, compute the following: a. The accounts receivable turnover in...
-
Tamahuy has another product, E50, which it currently sells directly from the factory to customers. The details for the E50 are as follows: Selling Price / unit $3,800 Current Annual Demand Direct...
-
There is a lottery with n coupons and n people take part in it. Each person picks exactly one coupon. Coupons are numbered consecutively from 1 to n, n being the maximum ticket number. The winner of...
-
Create an instance of the class Square and reference it with the name MySquare. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End Constructor...
-
Write the statement that would be used in the main program to compute the area of MySquare. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End...
-
1. How does automating the employee referral process encourage referrals? 2. What do you think some of the drawbacks of getting referrals from social network sites might be?
-
Can algorithms produce better hiring results than people can? Justify your position on this question.
-
Most people think of sales and immediately think of a used car salesperson. However, sales ability and the ability to influence others is in almost every career field. Consider your own personal...
-
Silver Company makes a product that is very popular as a Mother's Day gift. Thus, peak sales occur in May of each year, as shown in the company's sales budget for the second quarter given below:...
-
A car is initially 12.4 m East of the Origin. It drives West at a constant speed of 25 m/s. What is its position after 3.5 s? Hint: Use this formula x = vt - x | Origin V= 25 m/s, West
-
What can reflective statements be challenging in the oars model? Provide Explanation.
-
Describe in words the formula for an estimated Cohen's d for two related samples.
-
a) Calculate the goodwill that was paid by Major Ltd on the acquisition of Minor Ltd. [10 marks] b) Prepare the consolidated statement of financial position for Major Ltd at 31 July 20X8. [30 marks]...
-
Modify, compile, and test the client program in Table 25.17 and the server program in Table 25.16 to simulate a local DNS client and server. The server has a short table made of two columns, domain...
-
Which of the following can be a source of data? a. A keyboard b. A monitor c. A socket
-
Write a method in Java to add a given prefix (as an integer) at the end of an IP address to create a string representing the CIDR notation (x.y.z.t/n).
-
Class A preferred shares, 2 , 2 0 0 shares issued and outstanding at the beginning of the year; quarterly dividend rate of $ 2 5 0 per share, cumulative; each share is convertible into 5 0 shares of...
-
he surface temperature on Venus may approach 737 K. What is this temperature in degrees Celsius? 737 K= C The temperature on Mercury may drop to 275 F at night. What is this temperature in degrees...
-
Man Inc. have 1 0 0 , 0 0 0 common shares outstanding. Earnings from continuing operations amounted to $ 1 , 6 8 0 , 0 0 0 ( after tax ) for the year ended 3 1 December 2 0 X 4 . Hominem s income tax...
Study smarter with the SolutionInn App