Create an instance of the class, Rectangle and reference it with the name MyRectangle. Class Square Declare
Question:
Create an instance of the class, Rectangle and reference it with the name 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: 40% (10 reviews)
Declare ...View the full answer
Answered By
Aysha Ali
my name is ayesha ali. i have done my matriculation in science topics with a+ . then i got admission in the field of computer science and technology in punjab college, lahore. i have passed my final examination of college with a+ also. after that, i got admission in the biggest university of pakistan which is university of the punjab. i am studying business and information technology in my university. i always stand first in my class. i am very brilliant client. my experts always appreciate my work. my projects are very popular in my university because i always complete my work with extreme devotion. i have a great knowledge about all major science topics. science topics always remain my favorite topics. i am also a home expert. i teach many clients at my home ranging from pre-school level to university level. my clients always show excellent result. i am expert in writing essays, reports, speeches, researches and all type of projects. i also have a vast knowledge about business, marketing, cost accounting and finance. i am also expert in making presentations on powerpoint and microsoft word. if you need any sort of help in any topic, please dont hesitate to consult with me. i will provide you the best work at a very reasonable price. i am quality oriented and i have 5 year experience in the following field.
matriculation in science topics; inter in computer science; bachelors in business and information technology
_embed src=http://www.clocklink.com/clocks/0018-orange.swf?timezone=usa_albany& width=200 height=200 wmode=transparent type=application/x-shockwave-flash_
4.40+
11+ Reviews
14+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
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...
-
Suppose Rectangle1 is an object of the class Rectangle and the statement Call Rectangle1.ComputeArea() appears in the main program. Which formula for area is used in the execution of the subprogram...
-
Suppose that the vertices for an instance of the traveling-salesman problem are points in the plane and that the cost c (u, ) is the euclidean distance between points u and . Show that an optimal...
-
On March 19, Modern Kitchens, a retail store, received Credit Memorandum 244 for $4,290 from J & M Appliance Corporation. The credit memorandum covered a return of damaged trash compactors originally...
-
What five steps are involved in estimating the impact of exchange rate changes on the value of the firm's real assets or on the value of equity?
-
MicroProducts, Incorporated (MPI) manufactures printed circuit boards for a major PC manufacturer. Before a board is sent to the customer, three key components must be tested. These components can be...
-
What is the System Element Architecture (SEA) Model?
-
You are provided with the following information for Gobler Inc. Gobler Inc. uses the periodic method of accounting for its inventory transactions. March 1 Beginning inventory 2,000 liters at a cost...
-
You fall asleep in class and don't wake up for 20 years. In 2018, the price for a iPhone x in the US was $800. In 2018, the price for one iPhone x in Spain was 600 Euros (its currency). WHEN you wake...
-
Home Realty, Incorporated, has been operating for three years and is owned by three investors. J. Doe owns 60 percent of the 9,000 total outstanding shares and is the managing executive in charge. On...
-
List all methods of an object in the class Rectangle. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End Constructor Public Subprogram SetSide...
-
Write the statement that would be used in the main program to set the length of the side of MyRectangle equal to 15 and the height equal to 25. Class Square Declare Protected Side, Area As Float...
-
Consider each of the following scenarios: a. A seller orally agrees with one of its best customers to deliver goods in exchange for $ 10,000. While the sellers practice is to obtain a written sales...
-
What are jock taxes? How is Tennessees jock tax unique?
-
How has globalization affected sport finance in the past ten years? How might it affect sport financial management in the future?
-
How does program planning budgeting differ from zero-based budgeting?
-
How does incremental budgeting differ from program planning budgeting? How does it differ from zerobased budgeting?
-
How are the features of a convertible bond similar to both debt and equity?
-
The ledger of Zug Limited at October 31, 2014, contains the following summary data: Cash dividends-common ........................................$ 120,000 Common...
-
Define relevant costs and discuss: (1) whether all future costs are relevant for decision making and (2) whether variable costs are always relevant and fixed costs are always irrelevant
-
Alice has been on a long trip without checking her e-mail. She then finds out that she has lost some e-mails or attachments her friends claim they have sent to her. What can be the problem?
-
In FTP, assume a client with user name John needs to store a video clip called video2 on the directory /top/videos/general on the server. Show the commands and responses exchanged between the client...
-
In Figure 26.13 in the text, what is the difference between the MAIL FROM in the envelope and the FROM in the header? Figure 26.13 Figure 26.13 Format of an e-mail Behrouz Forouzan 20122 Olive Street...
-
Clark Company's current year income statement, comparative balance sheets, and additional information follow. For the year. (1) all sales are credit sales. (2) all credits to Accounts Receivable...
-
A process manufacturer reports the following: Conversion Units Beginning work in process inventory 194,000 Percent Complete 85% Units started this period 420,000 Units completed and transferred out...
-
Crane Windows manufactures and sells custom storm windows for three-season porches. Crane also provides installation service for the windows. The installation process does not involve changes in the...
Study smarter with the SolutionInn App