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: 75% (12 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?
-
1. Why are southern European countries particularly vulnerable to a strong euro? 2. How does the relatively high inflation rate in southern Europe add to the problems created by a strong euro? 3. In...
-
In the spring of 1999, Source Associates, Inc. (Source), and Conrad A. Mamajek, Inc. (CAM), entered into a joint venture to act as a middleman for the sale of polymers manufactured by Mitsui...
-
Gitano Products operates a job-order costing system and applies overhead cost to jobs on the basis of direct materials used in production (not on the basis of raw materials purchased). All materials...
-
Relational Databases are based on relational models and relational math. Write a brief description and history of the relational model.?
-
For one of the binary systems listed in Table 13.10, based on Eq. (13.19) and the Wilson equation, make the following calculations: (a) BUBL P : t = 60C, x 1 = 0.3. (b) DEW P : t = 60C, y 1 = 0.3....
-
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...
-
Syngas is made from a. coal b. oil c. natural gas d. carbon dioxide
-
"There is a fusion of equity and common law". Is this true? Explain. "There is a fusion of equity and common law". Is this true? Explain.
-
1. Please write a few sentences refuting the following statement proving it is false Cash advance/payday lending is financial services for lower-income people that help them get ahead using the facts...
-
best financial practice: explain why budgeting important for an hospital given the current policy and regulatory environment.
-
People live in a data-driven world. In personal lives, people are surrounded by websites offering weather or airfare predictions, and in professional lives, people deal with revenue projections and...
-
In many cities, African-American people fare worse than White or Hispanic people fare on a variety of indicators. For this assignment, you are tasked with creating a report (in the format of your...
-
In the song The Twelve Days of Christmas, my true love gave me 1 gift on the first day, 1 + 2 gifts on the second day, 1 + 2 + 3 gifts on the third day, and so on for 12 days. (a) Find the total...
-
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...
-
How can an organization effectively measure the intangible aspects of quality, such as customer satisfaction or employee morale, in the context of Total Quality Management?
-
1. You long a put with maturity at T with strike K = $4,000. You short a put on the same underlying asset with strike K = $4,500. ST is the price of the underlying asset at maturity. (i) What is your...
-
1) Of the four different ways to buy or sell an item, which is the only one that makes buyers compete directly for the purchase? 2) A mutual fund had a return last year of 16.5%. The risk-free return...
Study smarter with the SolutionInn App