Vous êtes sur la page 1sur 10

2021/2022

GL (SN)

QCM

1. Le protocole HTTP/2 apporte comme fonctionnalités principales:


a. Multiplexage (Correct)
b. Compression des entêtes (Correct)
c. La standardisation du protocole (Correct)
d. L'extensibilité (Correct)

2. Dans un système de virtualisation par conteneur, seules les resources suivantes sont
virtualisées:
a. RAM / CPU / RESEAU (Correct)
b. RAM / DISQUE DUR / RESEAU (Incorrect)
c. PROCESSUS / BINS / LIB (Incorrect)
d. Tout est virtualisé (Incorrect)

3. Quelle commande permet de télécharger une image sur le docker hub?


a. docker load image_name (Incorrect)
b. docker pull image_name (Correct)
c. docker get image_name (Incorrect)
d. docker pull hub.docker.com/image_name (Incorrect)

4. La commande docker exec permet de :


a. Démarrer un container existant (Incorrect)
b. D'exécuter une commande à l'intérieur d'un container (Correct)
c. D'arrêter un container (Incorrect)
d. De lier le container en exécution à la sortie standard du terminal (Correct)

5. Dans un réseau docker quel paramètre est utilisé comme nom de domaine du
container? :
a. Nom du container (Correct)
b. id du container (Incorrect)
c. Le nom de l'image docker (Incorrect)
d. Aucune réponse (Incorrect)
Exercise 1

1. Based on your general knowledge, list the operations that this web service must offer:
 Adding a new contact to the directory
 Removing a contact from the directory
 Modifying an existing contact in the directory
 Searching for a specific contact in the directory
 Listing all contacts in the directory
 Importing contacts from a file or external source
 Exporting contacts to a file or external destination

2. Based on the previous answer, here is an example of the interface (in Java) of the
service:

public interface ContactDirectoryService {


void addContact(Contact contact);
void removeContact(int contactId);
void modifyContact(Contact contact);
Contact searchContact(int contactId);
List<Contact> listContacts();
void importContacts(String filePath);
void exportContacts(String filePath);
}

public class Contact {


int id;
String firstName;
String lastName;
String phoneNumber;
String email;
// other fields such as address, etc.
}

3. Here is an example of an appropriate UML diagram that illustrates the architecture of


the system:

The UML diagram should include the following elements:

 A class diagram showing the ContactDirectoryService interface and the Contact


class, with the appropriate attributes and operations for each.
 A sequence diagram illustrating the interactions between the client (phone
application) and the server (web service) when performing various operations on
the directory, such as adding a new contact or searching for an existing one.
 An object diagram showing the instances of the ContactDirectoryService
interface and Contact class, and how they are connected to each other.

Here is an example of what the UML diagram could look like:

[UML diagram image]

The diagram shows that the client sends requests to the ContactDirectoryService
interface, which is implemented by the server. The server then performs the requested
operation on the directory and returns the result to the client. The Contact class
represents the individual contact entries in the directory, with attributes such as first
name, last name, and email address.

Exercise 2

1. The principles of object-oriented modeling are as follows:

 Encapsulation: Encapsulation refers to the idea of bundling data and behavior


together in a single unit, or object. This allows for data to be protected from
external access or modification, and enables the object to control how its data is
used.
 Abstraction: Abstraction refers to the process of identifying the essential
characteristics of an object and ignoring the non-essential details. This allows for
the creation of simplified models that can be used to represent real-world
concepts in a more manageable way.

These principles are fundamental to object-oriented modeling, as they


allow for the creation of models that are modular, flexible, and easy to maintain.
They are also closely related to the SOLID principles of object-oriented design,
which focus on the design of object-oriented software.

2.

3.
2020/2021

GL (SN)

Question

1. Software reuse is the practice of using existing software components or systems to build
new software applications or systems. This can help improve productivity, quality,
maintainability, and flexibility, and can reduce the time and cost of software
development. It is a useful tool for addressing the challenges of software engineering
and mitigating the impact of the "software crisis."
2.
 Compatibility issues: Reusable software components or systems may not be
compatible with the specific needs or requirements of a particular project, which
can reduce the benefits of reuse.
 Poor documentation: Reusable software components or systems may not be
adequately documented, which can make it difficult for developers to
understand how to use them effectively and reduce the efficiency of reuse.
 Lack of maintainability: Reusable software components or systems may be
difficult to maintain or update over time, which can reduce their usefulness and
increase the risk of defects. This can make it difficult to incorporate new features
or fix problems with the component or system, which can reduce the benefits of
reuse.
 Intellectual property issues: Reusable software components or systems may be
subject to intellectual property rights, such as patents, copyrights, or
trademarks. This can create legal or licensing issues that can restrict the use of
the component or system, which can reduce the benefits of reuse.
 Dependency management: Reusable software components or systems may
depend on other components or systems, which can create complex
dependencies that can be difficult to manage. This can increase the complexity
of the software development process and reduce the benefits of reuse.

3.
In software engineering, a component model is a way of organizing the modular pieces
of a software system. It specifies how components can be designed, implemented, and
composed together. Components are self-contained units of functionality that are
designed to be reusable and can be easily integrated into a larger system. The goal of a
component model is to make it easier to develop and maintain software systems by
breaking them down into smaller, more manageable pieces.
4.
Incompatibility between components in an ecosystem can cause reduced functionality,
system instability, and increased maintenance and development costs. To avoid these
problems, it is important to thoroughly test components for compatibility before
integrating them into a system, and to have a plan in place for handling compatibility
issues when they arise.

5.
There are several reasons why it is important for components to be based on a
component model:
 Reusability: One of the main benefits of component models is that they enable
components to be reusable. This means that components can be easily
integrated into multiple different systems or contexts, which can save time and
effort in the development process.
 Modularity: Component models also promote modularity, which means that
components can be easily added, removed, or replaced without affecting the
rest of the system. This makes it easier to maintain and evolve the system over
time.
 Interoperability: Components that are based on a component model are
designed to be interoperable, which means that they can work seamlessly with
other components, even if they are developed by different teams or
organizations.
 Maintainability: A component model can help to make a software system more
maintainable by breaking it down into smaller, self-contained units of
functionality. This can make it easier to identify and fix problems when they
arise.
Overall, using a component model can help to make software development more
efficient and effective by enabling the creation of reusable, modular, interoperable, and
maintainable components.

Exercise 1
1.
Design patterns and UML (Unified Modeling Language) are two different things,
although they are often used together in the software development process.
Design patterns are solutions to common software design problems. They are reusable
solutions that can be applied to specific design challenges in order to improve the
design of a software system.

UML, on the other hand, is a standardized visual modeling language that is used to
represent and document the design of a software system. It provides a set of graphical
notation elements that can be used to create visual models of a system's components,
their relationships, and their interactions.
UML can be used to represent design patterns, but design patterns are not an extension
of UML. Instead, UML is just one tool that can be used to document and communicate
design patterns.

The importance of UML in the definition of design patterns lies in its ability to provide a
standardized and visual way of representing and communicating design ideas. UML can
be used to create diagrams that illustrate the structure and behavior of a design pattern,
which can make it easier for developers to understand and implement the pattern.

2. ….

Exercise 3

1.
Software architecture refers to the high-level structure of a software system, including
the organization and relationships of its components and the principles that guide their
design and evolution. It serves as a blueprint for the design and implementation of the
system, and helps to ensure that the system is modular, scalable, maintainable, and
flexible.

2.

3.

4.
Yes, UML (Unified Modeling Language) is often used as the modeling notation for
software architecture. UML is a standardized visual modeling language that is widely
used in the software development industry for representing and documenting the
design of software systems.

There are several reasons why UML is well-suited for modeling software architecture:
 UML provides a rich set of notation elements that can be used to represent the
various components of a software system, as well as the relationships and
interactions between those components.
 UML diagrams are graphical and visual, which makes them easy to understand
and communicate to others.
 UML is a standardized language, which means that it is widely understood and
accepted by the software development community. This can make it easier to
communicate and collaborate with other developers.
 UML is flexible, and can be used to model a wide range of different types of
systems and architectures.
Overall, UML is a powerful and widely-used modeling language that is well-suited for
representing and documenting software architecture.
2019/2020
GL(SN)

Questions

1.
It is important to develop a component in accordance with a component model because
it can help to ensure that the component is:
 Reusable: A component model specifies how components should be designed
and implemented to be reusable, which means that they can be easily integrated
into multiple different systems or contexts.
 Modular: A component model promotes modularity, which means that
components can be easily added, removed, or replaced without affecting the
rest of the system. This makes it easier to maintain and evolve the system over
time.
 Interoperable: Components that are developed in accordance with a component
model are designed to be interoperable, which means that they can work
seamlessly with other components, even if they are developed by different
teams or organizations.
 Maintainable: A component model can help to make a component more
maintainable by breaking it down into smaller, self-contained units of
functionality. This can make it easier to identify and fix problems when they
arise.

Overall, developing a component in accordance with a component model can help to


ensure that it is reusable, modular, interoperable, and maintainable, which can make it
easier to integrate into a larger system and maintain over time.

2.
There are many different types of component models that have been developed over
the years, each with its own set of principles and characteristics. Some common types of
component models include:
 Object-oriented component model: This type of model is based on the principles
of object-oriented programming, and defines components as self-contained
objects that encapsulate data and behavior.
 Service-oriented component model: This type of model defines components as
services that can be called upon to perform a specific task or function.
 Function-oriented component model: This type of model defines components as
discrete units of functionality that can be combined to perform a larger task.
 Component-oriented component model: This type of model defines components
as modular pieces of a system that can be easily plugged in or replaced.
 Microservices component model: This type of model defines components as
small, independent services that can be developed and deployed independently
of one another.
Overall, the choice of component model will depend on the specific needs and
requirements of the system being developed.

3.
An ecosystem of components consists of a number of different elements, including:
 Components: These are the modular pieces of functionality that make up the
system. They can be developed and maintained independently of one another,
and are designed to work together to form a cohesive whole.
 Interfaces: These are the points of communication between components, and
define how components can interact with one another.
 Protocols: These are the rules and standards that govern communication
between components, and ensure that components can work together
seamlessly.
 Dependencies: These are the relationships between components, in which one
component depends on another to function properly.
 Services: These are the functions or capabilities that components provide to the
overall system.
 Data: These are the inputs and outputs that are exchanged between
components.

Overall, an ecosystem of components consists of the various elements that work


together to form a functioning system.

4.
There are a number of conditions, or constraints, that must be satisfied in order for
components to coexist in an ecosystem:
 Compatibility: Components must be compatible with one another in order to
work together seamlessly. This means that they must be able to communicate
and exchange data using the same interfaces, protocols, and data formats.
 Interoperability: Components must be interoperable, which means that they
must be able to work together seamlessly, even if they are developed by
different teams or organizations.
 Modularity: Components must be modular, meaning that they can be easily
added, removed, or replaced without affecting the rest of the system.
 Reusability: Components should be designed to be reusable, so that they can be
easily integrated into multiple different systems or contexts.
 Maintainability: Components must be maintainable, which means that they
should be designed in a way that makes it easy to identify and fix problems when
they arise.
5.
Components and services are both modular pieces of functionality that can be used to
build software systems. However, there are some key differences between the two:
 Structure: Components are typically structured as self-contained units of
functionality that encapsulate data and behavior. Services, on the other hand,
are structured as functions or capabilities that can be called upon to perform a
specific task or function.
 Interface description: Components typically have a well-defined interface that
specifies how they can be used and integrated into a larger system. Services also
have an interface, but it is often less formal and more focused on the specific
task or function that the service provides.
 Implementation language: Components and services can be implemented in a
variety of programming languages, depending on the needs and requirements of
the system.
 Execution platform: Both components and services can be executed on a variety
of different platforms, such as desktop, web, or mobile.

Overall, the main distinction between components and services is their structure and
the way in which they are used and integrated into a larger system. Components are
self-contained units of functionality that are designed to be reusable, while services are
functions or capabilities that can be called upon to perform specific tasks or functions.

6.
Service-Oriented Architecture (SOA) is a design approach based on the use of services as
the basic building blocks of a software system. It promotes reusability, interoperability,
modularity, and flexibility. SOA focuses specifically on the use of services, while
component-based development can be applied to a wider range of modular pieces of
functionality.

Exercise 1

Creational design patterns:


 Singleton
 Factory Method
 Abstract Factory

Structural design patterns:


 Adapter
 Composite
 Decorator
 Façade

Behavioral design patterns:


 Command
 Interpreter
 Iterator
 Observer
 Template Method
 Visitor

Exercise 2

Exercise 3

Vous aimerez peut-être aussi