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?
-
Suppose that you have one domestic production facility that supplies both the domestic and foreign markets. Assume that the demand for your product in the domestic market is Q = 2,000 - 3P, and in...
-
What public document reviews may be helpful to a forensic accountant?
-
Haley Romeros had just been appointed vice president of the Rocky Mountain Region of the Bank Services Corporation (BSC). The company provides check processing services for small banks. The banks...
-
Question 2 (10 minutes Jim Gant has worked for Dr. Ken Flood for several years. Jim demonstrates a loyalty that is rare among employees. He hasn't taken a vacation in the last three years. One of...
-
A ride hailing company has their DB structured in 3 major tables as described in the SCHEMA section below. Write a query to fetch the top 100 users who traveled the most distance using the service....
-
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...
-
Do you think it is ethical for a prospective employer to investigate your social media footprint in making a hiring decision? What about monitoring social networking activities of employees while on...
-
Sands, Co. has 200,000 shares of common stock and $1,000,000 of 3% convertible bonds outstanding. Each $1,000 bond is convertible into 10 shares of common stock. Net income is $2,000,000 and the...
-
As you might be aware, Harvard University recently entered the online graduate business programs industry with an online MBA offering and an online MSBA (M. S. in Business Analytics) offering. Use an...
-
What are the benefits if university of Windsor start runing its MBA or DBA program in Toronto rather than windsor city ?
-
As a current Hospital and University Security Manager in a high demand downtown section transitioning in to a new job/role as an Assistant Principal at highly favored and valued Charter school how...
-
K The campus barber faces stiff competition from the large number of shops that surround the campus area, and for all practica 15 people a day. His shop is open 4 days a week. Calculate his weekly...
-
Suppose that the yields-to-maturity on one-, two-, and three-year bonds are 10, 11, and 12 per cent, respectively. On each bond, the coupon rate is 12 per cent. Answer the following questions...
-
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...
-
FinTech Solutions, an innovative financial technology company, acquired an advanced data processing center on 1 January 20X1 for $1,500,000. The data center has an estimated residual value of...
-
QUESTION 36 A contract of position. adhesion is a contract containing clauses with unfavorable terms supporting a party seen as holding a superior bargaining QUESTION 37 A written contract or...
-
Central Airlines offers a series discount of 5/5/5 for frequent flyers. If a round-trip airline ticket is $569, what is the net cost after the series discount? Round to the nearest cent. OA. $81.15...
Study smarter with the SolutionInn App