Object-Oriented Concepts and UML Diagrams Explained
Object-Oriented Concepts
Object: An object is anything that we can recognize with an identity, a state, and behavior.
Class: It is an abstraction representing a set of objects with similar behavioral characteristics.
Use Cases
Use Case: A sequence of interactions (user-software product) to meet requirements.
Actor: Anyone who needs to meet their requirements. There may be 3 types:
- Main: The one who initiates the use case and needs to fulfill its requirements.
- Partner: An actor interacting with the principal
Validação de Formulários HTML com JavaScript e Regex
Validação com Expressões Regulares (Regex)
Validar Apenas Números
Expressão regular para checar se o campo possui apenas números.
function validaApenasNumero() {
var regex = /^\d+$/;
var value = document.getElementById("name1").value;
if (regex.test(value)) {
alert("Correto");
return;
}
alert("Errado");
return;
}Nome: Ok
Validar Apenas Letras
Expressão regular para checar se o campo possui apenas letras.
function validaApenasLetras(){
var regex = /^[a-zA-Z]+$/;
// Corrigido: Read More
Understanding Use Cases, Object Interaction, and Domain Models
Understanding Use Cases
Use Case: A business process that begins and ends with an actor, accomplishing a business task for that actor.
Components:
- Operation: A series of actions or instructions to accomplish a step in a business process.
- Action: An indivisible act, movement, or instruction performed during an operation.
Steps in Use Case Development
- Identifying use cases: deriving use cases, actors, and subsystems.
- Rearranging use cases among subsystems.
- Constructing a traceability matrix.
- Specifying use
Domain Modeling: Key Concepts and UML Representation
Domain Model and Cartographer Strategy
The construction of a Domain Model (DM) is compared to a cartographer’s strategy because of the following reasons:
- Existing Names: A DM should use the existing names within a territory. It utilizes the vocabulary of the domain, including conceptual classes and attributes.
- Relevance: A cartographer removes elements from a map if they are not considered relevant to the map’s purpose. Similarly, a DM may exclude conceptual classes from the problem domain that are
C Code Examples: Neurons, Vectors, and ID Validation
Neurons
The following C code demonstrates a simple neuron activation function.
#include <stdio.h>
int main() {
int entry[5], weights[5], limit, and;
putchar('\n');
for (int i = 0; i < 5; i++) {
printf("Entry%d: ", i);
scanf("%d", &entry[i]);
}
putchar('\n');
for (int i = 0; i < 5; i++) {
printf("Weight%d: ", i);
scanf("%d", &weights[i]);
}
putchar('\n');
printf("Limit: ");
scanf("%d", &limit);
Read More
Database Normalization: 3NF Explained with Examples
Understanding 3NF (Third Normal Form) in Databases
This document explains the concept of Third Normal Form (3NF) in database normalization, including examples and step-by-step conversion.
Question 1: 3NF Determination and Conversion
Given a relation R(X, Y, Z) and Functional Dependency set FD = {X → Y and Y → Z}, determine if R is in 3NF. If not, convert it into 3NF.
Candidate Key Identification
Let’s calculate the closure of X: X+ = XYZ (from the closure method). Since the closure of X contains
Read More