You are on page 1of 10

Pearson

Higher National in
Computing

Unit 20: Advanced Programming

ASSIGNMENT
BRIEF

This Assignment Brief is the property of


THE MILLENNIUM UNIVERSITY COLLEGE
Higher National Certificate/Diploma in Computing
Assignment Brief
Pearson Reg. Number
Student Name
Unit Number and Title Unit 20: Advanced Programming
Academic Year 2022-23
Unit Tutor Umair Atimad
Assignment Title Programming & Software Engineering Practices
Issue Date 17-Oct-2022
Submission Date 1-Jan-2022
Submitted On
Internally Verified?  Yes  No
IV Name Mir Wajid Ali
IV Date 15-July-2022
Student Declaration
I solemnly declare that the work submitted for this assignment is my own and research sources
are fully acknowledged.

Student Signature: Tutor Signature:


Date: Date:

Submission Format

The submission is in the form of an individual written report and project files. This should be
written in a concise, formal business style using single spacing and font size 12. You are
required to make use of headings, paragraphs and subsections as appropriate, and all work
must be supported with research and referenced using the Harvard referencing system. Please
also provide a bibliography using the Harvard referencing system. The recommended word
limit is 2,000 – 2,500 words, although you will not be penalised for exceeding the total word
limit.

You are required to submit your work for plagiarism checking. No work will be considered if it
contains plagiarism more than the acceptable level defined as per TMUC’s plagiarism policy.
Unit Learning Outcomes:
LO1 Examine the key components related to the object-oriented programming paradigm,
analyzing design pattern types
LO2 Design a series of UML class diagrams
LO3 Implement code by applying design patterns.
LO4 Investigate scenarios with respect to design patterns.

This Assignment Brief is the property of


THE MILLENNIUM UNIVERSITY COLLEGE
Assignment Brief and Guidance:

You are recently hired by Ovex Technologies as Trainee Developer under the Mentorship
program. You are deployed with Team Echo as your start.

Activity 1

Team Echo is currently working on a Project that involves Object Oriented Programming skills;
hence, the team leader has assigned you the task to develop a formal report reflecting:

 the object-oriented programming paradigm, its characteristics and class relationships.

 You may go further deeper into the topic and explore the design pattern(s) from each
of the pattern types (creational, structural, and behavioral) and may also relate them
with the OOP paradigm.

Activity 2

Furthermore, Since you have a good understanding of UML tools hence, your team lead has
assigned you a task to design and build at least 2 to 3 Class Diagrams for the given scenario
(attached as Anx. A) using your preferred UML tool.

You may also define and relate each diagram with specific design pattern using UML tool and
may also write a report that analyses how class diagrams can be derived from given code
scenario (attached as Anx B) using UML tool

Activity 3

You are further required to develop an application based on your designed UML Class
Diagrams. You may use any IDE as a development tool. You may give special consideration
towards the implementation of design patterns during the development of code. You may also
write a report of evaluation for the developed application with regards to the use of design
patterns.

Activity 4

For the evaluation of your expertise and knowledgebase, your team lead has assigned you a
task to develop a report related to design patterns. In your report, you need to explain the
range of design patterns from each type and support your evidence with relevant examples for
each design pattern and use illustration.

Furthermore, your team lead has assigned you with some scenarios (Attached in Anx. C) and
are required to evaluate and reconcile them with the appropriate design pattern. You need to
evaluate atleast 3 scenarios and include a critical evaluation of design patterns for each
scenario with providing a formal justification of your choices made in report.

Please access HN Global for additional resources support and reading for this unit. For
further guidance and support on report writing please refer to the Study Skills Unit on HN
Global. Link to www.highernationals.com

This Assignment Brief is the property of


THE MILLENNIUM UNIVERSITY COLLEGE
Grading Criteria
Learning Outcome Pass Merit Distinction
LO1 Examine the key P1 Examine the M1 Determine a D1 Analyse the
components related characteristics of the design pattern from relationship between
to the object- object-orientated each of the the object-orientated
oriented programming paradigm as well as creational, structural paradigm and design
paradigm, analyzing the various class and behavioral patterns
design pattern types relationships pattern types
LO2 Design a series of P2 Design and build M2 Define class D2 Analyse how class
UML class diagrams class diagrams using a diagrams for specific diagrams can be
UML tool. design patterns using derived from a given
a UML tool. code scenario using a
UML tool.
LO3 Implement code P3 Build an M3 Develop code that D3 Evaluate the use of
applying design application derived implements a design design patterns for the
patterns. from UML class pattern for a given given purpose specified
diagrams purpose. in M3.

LO4 Investigate P4 Discuss a range of M4 Reconcile the most D4 Critically evaluate a


scenarios with respect design patterns with appropriate design range of design
to design patterns. relevant examples of pattern from a range patterns against the
creational, structural with a series of given range of given scenarios
and behavioral pattern scenarios. with justification of
types. your choices.

This Assignment Brief is the property of


THE MILLENNIUM UNIVERSITY COLLEGE
Anx A
UML Class Diagram Scenario:
Provide a UML class diagram which shows a domain model for online shopping. The purpose of
the diagram is to introduce some common terms, "dictionary" for online shopping - Customer,
Web User, Account, Shopping Cart, Product, Order, Payment, etc. and relationships between. It
could be used as a common ground between business analysts and software developers.
Each customer has unique id and is linked to exactly one account. Account owns shopping cart
and orders. Customer could register as a web user to be able to buy items online. Customer is
not required to be a web user because purchases could also be made by phone or by ordering
from catalogues. Web user has login name which also serves as unique id. Web user could be in
several states - new, active, temporary blocked, or banned, and be linked to a shopping cart.
Shopping cart belongs to account.

This Assignment Brief is the property of


THE MILLENNIUM UNIVERSITY COLLEGE
Anx B
Scenario:
class Product {
public:
virtual ~Product() {}
virtual std::string Operation() const = 0;
};
class ConcreteProduct1 : public Product {
public:
std::string Operation() const override {
return "{Result of the ConcreteProduct1}";
}
};
class ConcreteProduct2 : public Product {
public:
std::string Operation() const override {
return "{Result of the ConcreteProduct2}";
}
};
class Decorator : public Component {
protected:
Component* component_;
public:
Decorator(Component* component) : component_(component) {
}
std::string Operation() const override {
return this->component_->Operation();
}
};
class Creator {
public:
virtual ~Creator(){};
virtual Product* FactoryMethod() const = 0;
std::string SomeOperation() const {
Product* product = this->FactoryMethod();
std::string result = "Creator: The same creator's code has just worked with " +
product->Operation();
delete product;
return result;
}
};
class ConcreteCreator1 : public Creator {
public:
Product* FactoryMethod() const override {
return new ConcreteProduct1();
}
};
class ConcreteCreator2 : public Creator {
This Assignment Brief is the property of
THE MILLENNIUM UNIVERSITY COLLEGE
public:
Product* FactoryMethod() const override {
return new ConcreteProduct2();
}
};
void ClientCode(const Creator& creator) {
std::cout << "Client: I'm not aware of the creator's class, but it still works.\n"
<< creator.SomeOperation() << std::endl;
}
class ConcreteStateA : public State {
public:
void Handle1() override;
void Handle2() override {
std::cout << "ConcreteStateA handles request2.\n";
}
};
class ConcreteStateB : public State {
public:
void Handle1() override {
std::cout << "ConcreteStateB handles request1.\n";
}
void Handle2() override {
std::cout << "ConcreteStateB handles request2.\n";
std::cout << "ConcreteStateB wants to change the state of the context.\n";
this->context_->TransitionTo(new ConcreteStateA);
}
};
void ConcreteStateA::Handle1() {
{
std::cout << "ConcreteStateA handles request1.\n";
std::cout << "ConcreteStateA wants to change the state of the context.\n";
this->context_->TransitionTo(new ConcreteStateB);
}
}
int main() {
std::cout << "App: Launched with the ConcreteCreator1.\n";
Creator* creator = new ConcreteCreator1();
ClientCode(*creator);
std::cout << std::endl;
std::cout << "App: Launched with the ConcreteCreator2.\n";
Creator* creator2 = new ConcreteCreator2();
ClientCode(*creator2);
delete creator;
delete creator2;
return 0;
}

This Assignment Brief is the property of


THE MILLENNIUM UNIVERSITY COLLEGE
Anx C
Scenario 1:
The given scenario shows a class being instantiated via sequence diagram. Reconcile the
appropriate design patterns and state its category. Also mention errors in given scenario (If Any)

Scenario 2:
The given scenario shows two classes in aggregation relationship with concrete implement
operations. Reconcile the appropriate design patterns and state its category. Also mention
errors in given scenario (If Any)

This Assignment Brief is the property of


THE MILLENNIUM UNIVERSITY COLLEGE
Scenario 3:
The given scenario shows a class and sequence diagram of a client class with a interface class
operations. Reconcile the appropriate design patterns and state its category. Also mention
errors in given scenario (If Any)

Scenario 4:
The given scenario shows different classes in a relationship with certain operative information.
Reconcile the appropriate design patterns and state its category. Also mention errors in given
scenario (If Any)

This Assignment Brief is the property of


THE MILLENNIUM UNIVERSITY COLLEGE
Scenario 5:
The given scenario shows classes and sub classes in certain relationships with attributes and
operations. Reconcile the appropriate design patterns and state its category. Also mention
errors in given scenario (If Any)

This Assignment Brief is the property of


THE MILLENNIUM UNIVERSITY COLLEGE

You might also like