Can you help me answer the following bullets? The 5 phases of the Software Engin
ID: 3678611 • Letter: C
Question
Can you help me answer the following bullets?
The 5 phases of the Software Engineering Life Cycle Model and which (in your opinion) is most important. OOp is general - know how to implement "information hiding" by using public and private access modifiers. OOP in general - know how to declare a class/constructors/methods, how a method receive arguments, and how a method returns values. OOp in general - know how to create an instance of a class (using "new"), how to call methods and pass in arguments, and how to use values are retuned. What is the difference between declaring a variable that will hold an instance of a class and actually creating the instance using the "new" statement.Explanation / Answer
1. Software life cycle models describe phases of the software cycle and the order in which those phases are executed. Each phase produces deliverables required by the next phase in the life cycle. Requirements are translated into design.
There are following six phases in every Software development life cycle model:
according to me Testing is most important as it includes different testing steps such as,
Testing: After the code is developed it is tested against the requirements to make sure that the product is actually solving the needs addressed and gathered during the requirements phase. During this phase all types of functional testinglike unit testing, integration testing, system testing, acceptance testing are done as well as non-functional testing are also done.
2. Information Hiding in OOP:
3. Class/method/construcyors in oop:
Method
An object capability, such as walk. It is a subroutine or function associated with a class.
Constructor
A method called at the moment an object is instantiated. It usually has the same name as the class containing it.
4. Creating an instance in oop:
An instance is a specific object built from a specific class. It is assigned to a reference variable that is used to access all of the instance's properties and methods. When you make a new instance the process is called instantiation and is typically done using the new keyword.
Think about classes, instances, and instantiation like baking a cake. A class is like a recipe for chocolate cake. The recipe itself is not a cake. You can't eat the recipe (or at least wouldn't want to). If you correctly do what the recipe tells you to do (instantiate it) then you have an edible cake. That edible cake is an instance of the chocolate cake class.
5. Instance variables:
Instance variables belong to an instance of a class. Another way of saying that is instance variables belong to an object, since an object is an instance of a class. Every object has it’s own copy of the instance variables.
eg:
Class variables:
Class variables, however, only have one copy of the variable(s) shared with all instances of the class. It’s important to remember that class variables are also known as static member variables in C++, Java, and C#. Each object of the class does not have its own copy of a class variable. Instead, every object shares the one and only copy of that class variable – and any changes made to that copy are seen by all of the objects of that class.
Difference between class and instance variables:
Now, it should be clear what the difference between instance and class variables is. Class variables only have one copy that is shared by all the different objects of a class, whereas every object has it’s own personal copy of an instance variable. So, instance variables across different objects can have different values whereas class variables across different objects can have only one value.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.