Write the statement that would be used in the main program to display the area of MyRectangle.
Question:
Write the statement that would be used in the main program to display the area of MyRectangle.
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)
Write T...View the full answer
Answered By
Ajay Negi
Hi, I've completed my degree in engineering (Information Technology) from an NIT. Currently working as a software engineer. Wish to impart quality education to the future generation.
5.00+
2+ Reviews
10+ 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 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,...
-
Marsden Corp has developed a new strategic plan after rushing defective products to market hurt the company's sales and image. The strategic plan's initiatives are to focus on quality and develop...
-
Identify cash flows after netting of transactions. Paving affiliate Net Receiving affiliate US Cn Mex PR. Total receipts Receits Payments UnitedStates Canadian Mexican Puerto Rican Total payments 0...
-
Express each radical in simplest form, rationalize denominators, and perform the indicated operations. 27x + 318x
-
What is the concept of bounded rationality? How might the concept be used to help distinguish between the provision of serviceable and unserviceable accounting information in environmental accounting?
-
The Clarence Corporation has issued bonds that pay semiannually with the following characteristics: a. Calculate modified duration using the information provided. b. Explain why modified duration is...
-
(15 points) Consider the Delta II booster engine whose parameters are given in Table 4.2 of the notes. Take the exhaust to be an ideal gas with specific heat ratio y = 1.2. (a) Using trial-and-error...
-
The U.S. equity markets have delivered very different returns over the past 90 years. Use the following data arranged by decade to answer the following questions about these U.S. equity investment...
-
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...
-
For the window shown in Figure 11.23 give the captions or labels for each of the following: a. Text box(es) b. Label object(s) Exercise Window The messge is: Hello Time r Both G Date OK Cancel
-
In developing a report on the effectiveness of the staffing process being conducted for entry-level jobs, what factors would you address in such a report and why?
-
A 8 . 3 2 m deep aquiarium has a glass observation window. The window is 2 . 5 6 m high by 4 . 7 m wide. If the bottom of the window is located 3 . 4 m above the bottom of the aquarium, how much...
-
Find at least three potentially problematic data entries (cells) in this table, and decide how you would choose to address them. Would you remove the whole row? Somehow try to guess what the answer...
-
Diversity is such a huge topic and many people don't even consider all the aspects of how diverse each of us really are. Diversity is more than skin color or gender. This week, as we explore the...
-
What is the document that contains all costs and fees and is provided to the buyer 3 days prior to settlement?
-
AMP Corporation (calendar-year-end) has 2020 taxable income of $1,900,000 for purposes of computing the 179 expense. During 2020, AMP acquired the following assets: (Use MACRS Table 1, Table 2, Table...
-
To demonstrate flavor aversion learning (that is, learning to dislike a flavor that is associated with becoming sick), researchers gave one group of laboratory rats an injection of lithium chloride...
-
In the figure, two loudspeakers, separated by a distance of d1 = 2.63 m, are in phase. Assume the amplitudes of the sound from the speakers are approximately the same at the position of a listener,...
-
Using RFC 1939, assume a POP3 client is in the download-and-keep mode. Show the transaction between the client and the server if the client has only two messages of 192 and 300 bytes to download from...
-
Can we have a data-transfer connection without a control connection in FTP? Explain.
-
POP3 protocol has some optional commands (that a client/server can implement). Using the information in RFC 1939, find the meaning and the use of the following optional commands: a. UIDL b. TOP 1 15...
-
The adjusted trial balance of Wildhorse Co . at the end of its fiscal year, August 3 1 , 2 0 2 2 , includes these accounts: Inventory $ 1 8 , 6 0 0 , Purchases $ 1 5 1 , 0 0 0 , Sales Revenue $ 1 9 0...
-
- (Z, Tdisc). (Justify your answer). ((0, 0), Tind). (Justify your answer). Write down a homeomorphism f: (N, Tdisc) Write down a homeomorphism f: ((1,2), Tind)
-
Garden Sales, Incorporated, sells garden supplies. Management is planning its cash needs for the second quarter. The company usually has to borrow money during this quarter to support peak sales of...
Study smarter with the SolutionInn App