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?
-
undefined k Assignment #1 Saved Greenfield Consultants conducts analyses of public policy issues. The company has two units: Government (with various U.S. government agencies as the only clients) and...
-
HVAC energy consumption. A control chart to monitor the installation of a new heating, ventilation, and air conditioning (HVAC) system for a clothing store in Panama City, FL, was presented in...
-
Procter & Gamble has been the leading soap manufacturer in the United States since 1879, when it introduced Ivory soap. However, late in 1991, its major rival, Lever Bros. (Unilever), overtook it by...
-
The MECCS Company pays a constant dividend of $2.46 a share. The company announced today that it will continue to pay the dividend for another 2 years and then in year 3 it will pay a final...
-
Pronto Real Estate purchased a small warehouse in Winnipeg some years ago for $720,000. (The accompanying land was also purchased, but that information is not necessary for purposes of this...
-
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...
-
Identify projects from your past experience that would have benefited from each of the three multiple-team team structures. State your reasons why and describe any concerns that you would have had to...
-
BREAD Products' pretax income for 2019 is * (1 Point) BREAD Products has no Work in Process or Finished Goods inventories at the close of business on December 31, 2018. The balances of BREAD's...
-
Convert the following line of code into assembly language. A (A B)+(BA) Where A and B are both 8-bit variables Activate Windows
-
14. Create a one variable Data Table from what you just copied and pasted giving the total sales for each department, and the Largest Sale from each department. Start your Criteria range in cell A1....
-
E4.1 (LO 1), C The following independent situations require professional judgment for determining when to recognize revenue from the transactions. a. Southwest Airlines sells you an advance-purchase...
-
Spring Flings Company, a fashion retailer that specializes in colorful graphic tees, prepares a master budget on a quarterly basis. The company has assembled the following data to assist in preparing...
-
What does it mean for a tag or an attribute of HTML to be deprecated?
-
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,...
-
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...
-
An estimated 84 percent of enterprises now use cloud computing solutions involving multiple clouds, whereas less than 10 percent of large organizations employ just a single public cloud. Group of...
-
XYZ inc. was involved in a tax dispute with the national tax authority. The companys legal counsel estimates that there is a 75% likelihood that the company will lose the dispute and that the amount...
-
3 . Accounting.. How does depreciation impact financial statements, and what are the different methods of depreciation?
Study smarter with the SolutionInn App