List all attributes of an object in the class Rectangle. Class Square Declare Protected Side, Area As
Question:
List all attributes of an object in the class Rectangle.
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: 50% (10 reviews)
Sid...View the full answer
Answered By
FREDRICK MUSYOKI
Professional Qualities:
Solution-oriented.
Self-motivated.
Excellent problem-solving and critical thinking skills.
Good organization, time management and prioritization.
Efficient troubleshooting abilities.
Tutoring Qualities:
I appreciate students as individuals.
I am used to tailoring resources for individual needs.
I can integrate IT into student's lessons.
I am good at explaining concepts.
I am able to help students progress.
I have a wide curriculum knowledge.
5.00+
1+ Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
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...
-
The potential energy of an object in the gravitational field of the earth is Ep mgh. What must be the SI unit of g if this equation is to be consistent with the SI unit of energy for Ep?
-
The acceleration of an object in the space is given by the vector function below: a (t) = t 2 i + e -t j + t k Find the position vector function, r (t), of this object if the initial velocity is 2 i...
-
While you may not work for a large corporation, there is merit to the notion that the organization must speak with one voice and speak quickly in a crisis. What forces (tradition, practice, and...
-
State how each of the following companies are affected by a real depreciation of the domestic currency: (a) An importer (b) An exporter (c) A diversified multinational corporation competing in...
-
You have been asked to evaluate possible sites for an Asian production facility that will manufacture your firms products and sell them to the Asian market. What real exchange rate considerations...
-
What could be key points of a company's anti-fraud program?
-
Retail Inventory Method Presented below is information related to McKenna Company. (a) Compute the ending inventory at retail. (b) Compute a cost-to-retail percentage (round to two decimals) under...
-
Suppose your selected company is planning to launch a new product. The target profit for this new product is roughly 1/12 the entire company's most recently reported annual profit (before taxes). The...
-
Dekon Companys December 31 year-end unadjusted trial balance shows a $8,000 balance in Notes Receivable. This balance is from one 6% note dated December 1, with a period of 45 days. Prepare any...
-
Write the statement that would be used in the main program to display the area of MySquare. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End...
-
Create an instance of the class, Rectangle and reference it with the name MyRectangle. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End...
-
Its a snowy day and youre pulling a friend along a level road on a sled. Youve both been taking physics, so she asks what you think the coefficient of friction between the sled and the snow is. Youve...
-
A North-East University has committed to invest in building two building complexes, one an innovation and educational facility, and the second a residential mid-rise mixed mode building complex at a...
-
West Coast Tours runs boat tours along the west coast of British Columbia. On March 5 , 2 0 2 3 , it purchased, with cash, a cruising boat for $ 9 0 0 , 0 0 0 , having a useful life of 1 0 years or 1...
-
A partnership between a social entrepreneurship course at Stanford University and the non-profit Light Up the World Foundation (www.lutw. org) worked to bring safe, affordable lighting to people in...
-
dissolve this balance sheet between three partners and show calculations and journal entry required to distribute it. Assets Cash 235,003 Accounts Receivable 31,000 Inventory 15,300 Office Equipment...
-
Parker Plastic, Incorporated, manufactures plastic mats to use with rolling office chairs. Its standard cost information for last year follows: Standard Quantity Standard Price ( Rate ) Standard Unit...
-
Describe at least four common potential injuries associated with performance of tasks that present ergonomic hazards. Select one and discuss how it may apply to a job with which you are familiar in...
-
Stephen Schor, an accountant in New York City, advised his client, Andre Romanelli, Inc., to open an account at J. P. Morgan Chase Bank, N.A., to obtain a favorable interest rate on a line of credit....
-
Can a host use a TELNET client to get services provided by other clientserver applications such as FTP or HTTP?
-
In FTP, a user (Maria) wants to move a file named file1 from /usr/users/report directory to the directory /usr/top/letters. Note that this is a case of renaming a file. We first need to give the name...
-
The TELNET application has no commands such as those found in FTP or HTTP to allow the user to do something such as transfer a file or access a web page. In what way can this application be useful?
-
Algona Deli had cash sales for the day of $1,200. In addition, all sales are subject to an 8% sales tax. What journal entry should be made to record the day's sales and sales taxes? Multiple Choice...
-
Which statement best describes when a variable with missing data should be remedied with imputation? Question 1 8 Answer a . When a small number of observations are missing for the variable. b . When...
-
A projection of budget data for various levels of activity is a static budget. variable budget. fixed budget. O flexible budget
Study smarter with the SolutionInn App