1.The summary is software items (classes, functions, modules) should be open for extension, but closed for modification.
2. This means that such an item will alow extension of its
behaviour without modifying its
source code.
3.It is a good idea because if we our class is in a library or
used somewhere and then if we
are changing the code for modification, then other programs
depending on it also gets changed
and this is an issue but if we extend its behaviour by implementing
inheritance , then in that
case whatever programs depeding on the original class won't have
any issues and we can
use the base class with extended properties as per our
requirement.
4.As per part 3, we can add functionality by using inheritance without changing the original source code and can add extended functionality.
Open-Closed Principle: (answer all the questions) a. Give the one sentence summary b Describe what it...
subject: principle of microeconomics
please answer all (no plagiarism)
The Questions 1-Describe some of the trade-offs faced by each of the following: a. a family deciding whether to buy a new car b. a member of Congress deciding how much to spend on national parks c. a company president deciding whether to open a new factory d. a professor deciding how much to prepare for class e. a recent college graduate deciding whether to go to graduate school 2-Consider the...
2. Convert the following 5 closed-ended questions to open-ended questions which might be more effective for a salesperson to ask their customer. a) Do you have a need for this type of product? b) Are you happy with your current product? c) Do you like this product? d) Do you think you would use this? e) Is price your biggest priority? a) Why there is the need for this type of product? b) What is the level of happiness with...
EXPERIMENT 8 Post-Lab Questions Section Name: 1 Consider the following system at equilibrium in a closed container (pressure at 1 atm): NaOH(s) CO,(0) NaliCO. (s) Ar 0 Concentration of CO: gas present at equilibrium can be decreased by True or False (T or F) adding Na gas to double the pressure adding more NaOH increasing the volume of the container lowering the temperature (10 pts) 2. 2Cro (aq. yellow) 2H,0-(aq) Cr o (aq, orange) + 3H20D (AH-ve) a. What would...
answer ONE of the following questions: 1. Give an example of a voluntary association and describe how women's involvement in them altered their lives. 2. Explain the difference between the "public" and the "private" spheres of life. Describe how those spheres changing in the early 19th century.
Standing Waves in a Pipe - Both Ends Open Pattern (a) Pattern (b) Pattern (c) Pattern (d) The above figure shows standing wave patterns in a pipe whose left end is closed but the right end is open in all the patterns, the length of the pipe L = 2.10 m. The speed of sound in air is 343 m/s. You will find the wavelengths and frequencies of these standing wave patterns. (C) In Pattern (c), What is the wavelength?...
Question 1 Atube with one end open and one end closed creates two consecutive harmonic frequencies at 300 Hz and 330 Hz. If the speed of sound in air is 343 m/s, answer the following questions. a. What is the fundamental frequency of the tube? b. What is the length of the tube? c. If mith frequency is 300 Hz, find 91. 5+5+5
please answer both homework questions!
2. Choose ONE of the following questions to answer: a. Why (from an evolutionary perspective) do humans live so much longer than the child-bearing and rearing years, compared to other (non-primate) mammals? The key here is to think about evolutionary advantages of longevity, and for whom? b. What are the implications (for medical practice, health policy, etc.) of normative genetically programmed aging and disease (e.g. Cellular Clock Theory)? This question is about medical practice (and...
Astronomy question 2
PART B -Essay type Questions (5 Marks each) Answer one of the following questions in the exam booklets provided using essay style, i.e. paragraphs comprised of grammatically correct sentences If you answer more than one question, you may earn bonus marks (up to a maximum of 10 bonus marks for good answers to all three questions) 1. Identify and explain the various methods used to determine distances to stars and galaxies. 2. What properties are stars in...
solve and explain all parts
QUESTION 1 Problem 1: Describe what will happen to the lampe in this circuit when S2 Lamp Lamp2 SI 12 V A Switch 1 is closed but switch 2 is open B. Switch 2 is closed but switch 1 is open C. Both wiches are closed D. How much total current flows in both witches are closed and the resistance of Lamot is 20 and Lamp 21 407 Show your work TTTT Paragraph Arial (12)...
Multiple Choice Questions: 1. Some of what we've learned about Income Summary account is: A) If we had a Net Loss, we will close Income Summary by debiting Income Summary and crediting Retained Earnings B) The income summary account is a temporary account that we create to close revenue, expenses, and dividends with it C) After closing revenue and expenses, the income summary account (before we close it) will have an ending balance that matches exactly the net income (or...