Correction Mock 2023
Correction Mock 2023
1- An algorithm is a step-by-step problem to procedure a result. Key words( step by step, task,
result, instruction, problem).
A queue uses the FIFO methodology that is the item stored first will be accessed first.
- A graph: is a pictorial representation of a set of objects where some pair of Object are connected
by links. The interconnected objects are represented by points called vertices and the link that
connect vertices are called edges.
- Tree: minimalist connected graph having no loop and circuits.
5- Define a flowchart and pseudocode and give example each.
6- 02 operations available in the stack:
- Push: it adds an item to the top of the stack. The overflow condition occurs if the stack is full.
- Pop: it removes the top item of the stack. If the stack is empty, an underflow condition occurs.
- Top: this returns the top item from the start.
- IsEmpty: it returns true of the stack is stack is empty otherwise false.
- Size: returns the size of the stack.
7- 2 operations of queue and explain:
- Front: it returns the frontend element without removing it.
- Rear: returns the rear end element without removing it.
- Enqueue adds an element to rear end of the queue.
- Dequeue removes an element from the front end of the queue
A .net framework can also be a template or collection of libraries develop by Microsoft windows for the
development of applications. App develop on the .net framework can only run on Windows os.
1- Define:
- Polymorphism: is the ability of an object to take on many forms or the capability of a method to
perform an action based on the object it is acting upon.
- Method overloading: is the type of method that has the same name but different parameters or
return type.
- Exception is an unexpected error that occurs during the execution of a program.
- An Abstraction is the process of hiding certain details and showing only essential one to the user.
Class Person {
Domain name
Extension
Protocol
Directory
File
The front-end developer deals with the UI and the UX while the back-end developer deals with UX.
The front-end developer uses technologies as HTML, CSS and React, Vue while the back-end
developers use technologies as Laravel, Node JS, MongoDB, MySQL.
SECTION D: NETWORKING
A network topology is the layout pattern of how the computer are set on the network.
An IP address has 4 sets of numbers. Each set with a value up to 255. The range of the home or
commercial connection starts between 190 or 10. IP classes are differentiated based on the number
of hosts it supports on a single network. If an IP class supports more networks, then very few IP
address are available on each network. On a local environment, the default IP is 127.0.0.1.
The IP 127.0.0.1 is the IP reserved for localhost connection while the localhost is the domain name
server of the 127.0.0.1.
DNS stands for Domain Naming Server. It acts as a translator between domain name and IP
addresses. Translating a domain name into numbers or IP address is called Forward LookUp.
Translating an IP address into a domain name is called Reverse LookUp.
A HUB is a device that is used to share information on the network without storing the address of
the device. A HUB will broadcast all data to every port.
A SWITCH is a device that will create a dynamic connection and provides information to the
requesting port without broadcasting it to the others.
If all the nodes are connected to a single cable, it is referred to as a linear bus topology.
If a device needs to communicated with another in star topology, the it has to send the signal to the
central device. The central device sends the same signal to the destination device.
Signal in a ring topology flows only a single direction from one device to another and reaches the
destination node. In this topology, each device of the network, is connected to two other devices on
either side in a form of a loop.
On the Mesh topology, each device is connected to all other devices of the network. It uses routing
N=n(n-1)/2. Where n is the number of nodes. The two types of mesh topology are the half mesh and
full mesh topology.
- The difference between CBV and CBR is that in CBV, values of variables are passed by simple
technics while in CBR a pointer variable is necessary to define and store the address of the value.
- In CBV there is no modification in the original value while in CBR there is a modification of the
original value.
- The programming languages that use CBV are C++, VB.Net, C#.
- Precedence refers to the order of operation. Operator precedence specifies how 2 expressions
can be binded together.
Example: 1+5*3 is 16 and not 18 because multiplication has a higher precedence than addition.
Define:
VI- OOM-UML
Notation Meaning
0…1 Zero or one
1 One only
0…* Zero or more
* Zero or more
1….* One or more
7 Seven only
0….2 Zero or two
4….7 Four to seven
EXERCISE 2:
With the use of Node JS, we have permit programmers to use JavaScript as backend language.
A website is a combination of webpages while a web application is a webpage that is run on the browser.
A Firewall is a software component that is used to prevent unauthorized access on the network.
The person to contact to have internet connection is the Internet Service Provider (ISP).
CORRECTION MOCK SIANTOU
I- ALGORITHM
1- These cases are important concept because they are used to evaluate important concept. They
are method of analyzing algorithms, taking into account the amount of times it takes the
algorithm to run in each scenario.
Best case: it focuses on computing the minimum amount of processing time required for any
given set of inputs. Let us consider a linear search algorithm as an example. The best case occurs
when x is present in the first location.
Worst case: it defines the input for which the algorithm takes more time or input for which the
algorithm runs the slowest. For a linear search problem, the worst case occurs when the element
to be search doesn’t exist in the array. The worst case time complexity of a linear search
algorithm is the O(n) where n is the number of cases.
Average case: Here we run the algorithm for any number of iterations, then compute the
running time for each trial, sums it, and divide by the total number of trials.
For a linear search problem, all the cases must be uniformly distributed. We add all the cases and
divide by the total number of cases.
2- Write a flowchart and pseudocode to have user enter 3 numbers and compare them:
Pseudocode:
Start
Else
End
FLOWCHART:
The four basics concepts if OOP are: inheritance, encapsulation, abstraction and polymorphism.