












































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This document reports about Advanced Programming subject with parts Pass, Merit and Distintion. With this document, you completely finish your assignment well. #btec #greenwich #advancedprogrammming #IT
Typology: Assignments
1 / 52
This page cannot be seen from the preview
Don't miss anything!













































Class: GCS0804_NX ID: GCS Assignment due: 1 7 / 0 4 / 2 0 2 1 Assignment submitted: 1 0 / 0 4 / 2 0 2 1
ASSIGNMENT 1 FRONT SHEET Qualification BTEC HND Diploma in Computing and Systems Development Unit number and title Unit 20: Advanced Programing Assignment due 17/04/2021 Assignment submitted 10/04/ Learner’s name Tran Nguyen Tan Sang Assessor name Nguyen Van Son Learner declaration: I certify that the work submitted for this assignment is my own and research sources are fully acknowledged. Learner signature TAN SANG Date Grading grid P1 P2 M1 M2 D1 D Assignment title Assignment 1: OOP principles, features and design. In this assignment, you will have opportunities to provide evidence against the following criteria. Indicate the page numbers where the evidence can be found. Assessment criteria Expected evidence Task no. Assessor’s Feedback
Assessor’s Signature : Date:
ASSIGNMENT 1 BRIEF Unit Number and Title 20: Advance Programming Academic Year 2020 Unit Tutor Nguyễn Văn Sơn Assignment Title Assignment 1 Issue Date Submission Date 17/04/ IV Name & Date Pass Merit Distinction LO1 Examine the key components related to the object-orientated programming paradigm, analysing design pattern types D1 Analyse the relationship between the object-orientated paradigm and design patterns. P1 Examine the characteristics of the object-orientated paradigm as well as the various class relationships. M1 Determine a design pattern from each of the creational, structural and behavioural pattern types. LO2 Design a series of UML class diagrams D2 Define/refine class diagrams derived from a given code scenario using a UML tool. P2 Design and build class diagrams using a UML tool. M2 Define class diagrams for specific design patterns using a UML tool. Specific requirements (see Appendix for Scenario You’ve just made a contract with FPT Academy International, and are about to be appointed as a Project Leader for a group of programmers to
it will display a message to inform users that the student/lecturer with such id doesn’t exist. When user chooses 5, program will first ask user to input student/lecturer id to update, once inserted and a student/lecturer with the inserted id exists, it will display current data for each field of the student/lecturer and user can type in new data to update or just press enter to keep the current data for the field. When user chooses 6, program will back to the main menu. Task 1 Produce a written, self-learning course for managers/senior developers that explain the principles and features of OOP and that show how OOP is good for code re-use. You can include appropriate sample Java code where it aids your points and/or provides further clarification. Ensure that any diagrams that are included have captions and are referenced in the text. Hint: You must include the following terms
D1 Analyse the relationship between the object-orientated paradigm and design patterns. D2 Define/refine class diagrams derived from a given code scenario using a UML tool. This brief has been verified as being fit for purpose Internal Verifier 1 Signature Date Internal Verifier 2 Signature Date
2) Abstraction : − Abstraction is one of the key concepts of object-oriented programming (OOP) languages. Its main goal is to handle complexity by hiding unnecessary details from the user. That enables the user to implement more complex logic on top of the provided abstraction without understanding or even thinking about all the hidden complexity. − That’s a very generic concept that’s not limited to object-oriented programming. You can find it everywhere in the real world. − Objects in an OOP language provide an abstraction that hides the internal implementation details. Similar to the coffee machine in your kitchen, you just need to know which methods of the object are available to call and which input parameters are needed to trigger a specific operation. But you don’t need to understand how this method is implemented and which kinds of actions it has to perform to create the expected result. − Let’s implement the coffee machine example in Java. You do the same in any other object-oriented programming language. The syntax might be a little bit different, but the general concept is the same. − Advantages of Abstraction
with the methods that operate on that data, into a single unit. Many programming languages use encapsulation frequently in the form of classes. A class is a program- code-template that allows developers to create an object that has both variables (data) and behaviors (functions or methods). A class is an example of encapsulation in computer science in that it consists of data and methods that have been bundled into a single unit. − Encapsulation may also refer to a mechanism of restricting the direct access to some components of an object, such that users cannot access state values for all of the variables of a particular object. Encapsulation can be used to hide both data members and data functions or methods associated with an instantiated class or object. − Implementation in C#: −
− Implementation in C#: − − Ouput: − 5) Polymorphism : − The word polymorphism is used in various contexts and describes situations in which something occurs in several different forms. In computer science, it describes the concept that objects of different types can be accessed through the same interface. Each type can provide its own, independent implementation of this interface. It is one of the core concepts of object-oriented programming (OOP). − If you’re wondering if an object is polymorphic, you can perform a simple test. If the object successfully passes multiple is-a or instanceof tests, it’s polymorphic. As I’ve described in my post about inheritance, all Java classes extend the class Object. Due to this, all objects in Java are polymorphic because they pass at least two instanceof checks. − Different types of polymorphism
classes using the override keyword. After overriding the abstract method is in the non- Abstract class. We can derive this class in another class and again we can override the same abstract method with it. − Abstract Class Features:
− An interface is a programming structure/syntax that allows the computer to enforce certain properties on an object (class). For example, say we have a car class and a scooter class and a truck class. Each of these three classes should have a start_engine() action. How the "engine is started" for each vehicle is left to each particular class, but the fact that they must have a start_engine action is the domain of the interface. − Implmentation in C#: − II. The various class relationships − Code reuse is one of the many benefits of OOP (object-oriented programming). Reusability is feasible because of the various types of relationships that can be implemented among classes. This article will demonstrate the types of relationships (from weak to strong) using Java code samples and the symbols in the UML (unified modeling language) class diagram. − Dependency
− Association