This is a solution of Object Oriented Programming in which we discuss c and c++ Programming language.
Object Oriented Programming
In this coursework I have worked on the principles of Object Oriented Programming and used them in the case study for making a Windows Calculator and word games in Visual C#. The methodologies and principles of OOP make the foundation for any OOP language and cleared my concepts for designing and analysing the software made. This programming is an industry- proven method for developing modular programs and is widely accepted in the software industry. It finds its application from Operating systems to mobile phones and other multimedia applications will be organizing this report in the same manner as mentioned in task sheet and will complete all the tasks as specified in assessment.
Task 1: Understand the principles of object oriented programming
1. Explain the advantages of OOP principles in the design of software solution to a problem such as described in the above scenario. OOP principles help in designing of complex software in easier and faster way. OOPs use the widely accepted rules and enable the re-use of code discouraging the rewriting of the code which makes the readability and maintenance of the code easy. We can enumerate some advantages of OOPs that have helped me in making the calculator and games in C#:-
2. Makes code Clear and Simple For designing software like a Windows calculator or a number game, various data elements and methods are required. In OOPs programming, the first step is to divide the whole idea into classes and objects via UML model. Classes will consist of data members and related methods and will form a capsule hiding the unnecessary details and providing a clear and simple interface for working (Booch et al, 2007). The property of modularity helped me in separating the functions and made it easier to manage.
3. Code Readability To improve the readability of code, we should introduce class hierarchies between parent and child objects. The child objects will inherit the parent class properties and hence enable reuse of functions which is called Inheritance.
4. Focus on important characteristics For avoiding confusion and following a structured approach, we can ignore other details and deal with objects only taking their important characteristics. This again makes it easier to manage a large code. This property is called as Abstraction.
5. Time saving By designing a code with future aspects and taking abstraction and encapsulation in mind, we can save time & money that goes in developing and maintaining a software project as above.
Modularity is the concept in which we divide a large program into small discrete components for easy management. It is against the bundling of logic into one single component. Thus it acts as an independent entity which can be compiled together and makes debugging easier. Also, for complex software application different teams can work on different modules independently. By defining an interface, a module can have feature changes and other alterations without really harming the end user activities. Modularity is a primary solution for code reuse. Within one system multiple code segments may use a single module, eliminating the need to recreate the required functionality in each separate subsystem
Software reuse allows organizations to use software modules that were developed,
implemented and tested by some other programmer rather than writing code from scratch (Pierce, 2002). It saves time and developmental costs. This can be done by creating internal abstractions or a complete custom library that can be used by software developers. Some features that make the code reusable are modularity, loose coupling, information hiding, and high cohesion. Reuse can be internal use i.e. reusing its own components designed before or taking it from a third party which can add cost to the project.
Abstraction means ignoring the irrelevant information i.e. feature, functions or properties and laying stress on relevant. Relevance can vary with a person’s perspective. So we can say relevant to the specific project keeping future reuse in mind. Hence its managing complexity in case of future needs. It’s looking at what we need. E.g. we need some data about a student for exam evaluation (Eugene, 1996). So for this requirement, we need to get his name and marks but can ignore the colour of his eyes. It can be achieved by making abstract classes, through interfaces or inheritance.
Inheritance allows child classes to inherit the characteristics of existing parent class which are data fields (properties) and operations (methods). The child class can extend the parent class and add new fields and methods and can also modify the existing behaviour of methods. A class can implement an interface by providing implementation to all its methods.
Types of inheritance:-
• A Derived class-—inherits—> Base/parent class
• A Class——implements——>lnterface
• A Derived interface-Implements-—> Base Interface
This property is useful as it allows reusability, provides abstraction and eliminates redundant code. We use it for building “IS-A” relationships. E.g. Samsung is a type of Mobile.
Cheap Assignment Help uk provide Object Oriented Programming based on case study requirements in c and c++ Programming language providing most Assignment of Programming with us,[order now]