List the attributes of the class Square. Class Square Declare Protected Side, Area As Float Public Square()
Question:
List the attributes of the class Square.
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: 76% (13 reviews)
Answered By
Rehab Rahim
I am well versed in communicating and teaching in areas of all business subjects. I have helped many students in different ways from answering answers to writing their academic papers.
5.00+
1+ Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
Class Person name year_of_birtho A two-argument constructor Student studentID holds o Two attributes i.e. and to initialize its data members with user-defined values Class has o Two attributes i.e....
-
List three products attributes that consumers can use as product quality signals and provide an example of each.
-
List the key attributes that an individual occupying the following positions must possess. Why are these attributes essential? a. Senior research analyst b. Full-time interviewer c. Market research...
-
12. Bill thinks that welfare is needed in some cases. However, his friends in the Young Republicans taunt him every time he makes his views known. As a result, he accepts their views in order to...
-
What is a hedge? Why is it difficult to distinguish a hedge from a speculative position? How does the United States' FAS #133 qualify a hedge?
-
Describe how you construct the uncertain yen denominated return from investing 1 yen in the Swiss franc money market.
-
A large company has a standard sales contract, but sales personnel frequently modify the terms of the contract. Sales personnel frequently grant authorized and unrecorded sales discounts to customers...
-
The dates of importance in connection with a cash dividend declared and paid of $55,350 on a corporations common stock are February 6, March 9, and April 8. Illustrate the effects on the accounts and...
-
Log Co. acquired a stand of timber on July 1, Yr 1 for $700,000. Estimated life is 10 years with a residual value of $100,000. Log Co. uses the UNITS OF OUTPUT method to compute depletion. It's...
-
1. How do the different players in the movie rental value chain provide and capture value? 2. What factors led to Netflixs growth? How should Blockbuster have responded to the challenge posed by...
-
The programming language supplies the code for the action that takes place when the user clicks a command button. True of False
-
Give the names of the methods of the class Square. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End Constructor Public Subprogram SetSide...
-
For the five-year period ended June 30, 2009, the Desjardins Environment Fund had one of the best performances of all diversified Canadian equity funds. It effectively earned a compound annual return...
-
What is the cost for example 11? The answer is one of these four appraisal cost internal failure cost external failure cost prevention cost 8 points for you! You have earned 52 points so far! Example...
-
Shawna, a married 2 9 - year - old , deferred 1 0 % of her salary or $ 1 0 , 0 0 0 , into a 4 0 1 ( k ) plan sponsored by her employer this yearHer husband, age 3 1 , was unemployed all year and did...
-
Cole, an unmarried individual with no dependents, has the following income items: Interest income $ 2 3 , 5 0 0 Schedule C net profit 6 0 , 1 6 0 Cole has $ 1 0 , 1 5 0 itemized deductions and the...
-
Spicer Inc. showed the following alphabetized list of adjusted account balances at December 3 1 , 2 0 2 3 . Assume that the preferred shares are non - cumulative. Accounts Payable $ 2 5 , 9 6 0...
-
henrie drapery services is investigating the purchase of a new machine for cleaning and blocking drapes. The machine would cost $ 1 0 2 , 9 9 0 , including freight and installation. Henrie s...
-
Does the civil law system offer any advantages over the common law system, or vice versa? Explain.
-
The slopes of the tangents at the points where the curve y = x2 - 4x intersects the X-axis is 1) 1 2) +2 3) +3 4) +4
-
Write a program to make the UDP client program in Table 25.2 more generic to be able to send any request created by the client program. Table 25.2 Echo client program using UDP I/ UDP echo client...
-
Explain which entity provides service and which one receives service in the client-server paradigm.
-
Assume we want to make the TCP client program in Table 25.2 more generic to be able to send a string and to handle the response received from the server. Show how this can be done. Table 25.2 Echo...
-
Does a mixed economy mean an economy where there is ? A . Existence of capitalism B . Privatization, liberalization and globalization C . Existence of both public and private sectors D . Growing...
-
Discussed in the chapter 13 and the article, "11 Weasel Words to Avoid in Conversation at All Costs" B weasel words are seen as unethical because organizations use them to
-
Consolidating entries ( fair value differs from book value ) Assume that on January 1 , 2 0 1 3 , an investor company acquired 1 0 0 % of the outstanding voting common stock of an investee company....
Study smarter with the SolutionInn App