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?
-
What are the advantages and disadvantages of operating at this level of measurement? What types of information about how teens use social media and technology might not be available as a result of...
-
A \(\$ 100,000\) bond priced at 103.5 can be bought or sold for a. \(\$ 100,000+\) interest b. \(\$ 103,500\) c. \(\$ 3,500\) d. \(\$ 10,350\)
-
What does each of the following categories of ratios attempt to measure? (a) Liquidity; (b) Long-term borrowing capacity; (c) Profitability. Name a group of users who might be interested in each...
-
During a frontal automotive collision, you are at risk of hip fracture or dislocation when your knee hits the bolster. A study showed that during a crash, the load applied to each knee was 3600N,...
-
Match each term with its definition or explanation. Terms can be used more than once. Term a. Face value b. Premium c. Maturity date d. Discount e. Interest payment Definition/Explanation frequency...
-
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...
-
Find the coefficient of x 8 y 5 in the expansion of (x 2y) 13 .
-
(b). The number of vehicles imported to Fiji has increased over the years. The number of vehicles is modelled by V(t)=3(4-6t - 9) 4, where V denotes the number of vehicles and t is the time in years....
-
Danny Diver weighs 500 N and steps off a diving board 10 m above the water. Danny hits the water with how much of kinetic energy ?
-
5 This problem concerns the following linear program: Maximize 3x + 7x + 5x3+4x4 + 6x5 + 3x6 Subject to 4x + 2x + 3x4 + 6x5 + 6x 20 + 3x6 18 4x1 + 6x + 8x3 + 2x4 3x1 + 5x2 + 5x3 + 2x4 + 2x5 + 2x6 16...
-
On December 31, 2024, Shamrock Corporation signed a 5-year, non-cancelable lease for a machine. The terms of the lease called for Shamrock to make annual payments of $8,215 at the beginning of each...
-
Evidently, desirability is a product that people want or need.Viability is a product that will be profitable.Feasibility is a product that can be created with new or existing technology. Can you...
-
Name and define two repeated-measures designs.
-
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...
-
A CAT scan of a human pancreas shows cross-sections spaced 1 cm apart. The pancreas is 12 cm long and the cross-sectional areas, in square centimeters, are 7.5, 15.0, 18.0, 10.3, 11.0, 9.7, 8.9, 7.7,...
-
Active dry yeast and bread machine yeast were not available in stores during the coronavirus pandemic. Fleischmann's attempted to staff two shifts to produce enough active dry yeast to put some yeast...
-
What are the critical success factors in stakeholder engagement and communication management, particularly in large-scale, multi-stakeholder projects with diverse interests and objectives ?
Study smarter with the SolutionInn App