Notes, summaries, assignments, exams, and problems for Design and Engineering

Sort by
Subject
Level

Implementación de Árbol General en Java: Código Fuente Comentado

Classified in Design and Engineering

Written on in English with a size of 2.57 KB


public class NuevoArbolGeneral1 implements ArbolGeneral{
private NodoArbol1 nodoRaiz;


public NuevoArbolGeneral1()
{ nodoRaiz = null; }

public NuevoArbolGeneral1(E elemRaiz, NuevoArbolGeneral1 ... hijos) throws NullPointerException {
if (hijos==null) throw new NullPointerException();
if (hijos.length == 0) nodoRaiz=new NodoArbol1<>(elemRaiz, null, null, null);
else { int i=0;
for (;i<hijos.length-1;i++)
hijos[i].nodoRaiz.setHer(hijos[i+1].nodoRaiz); }
nodoRaiz=new NodoArbol1<>(elemRaiz, hijos[0].nodoRaiz, null, hijos[i].nodoRaiz); } }


private NuevoArbolGeneral1(NodoArbol1 raiz) { nodoRaiz = raiz; }

public boolean esVacio() { return nodoRaiz == null; }

public E raiz() throws ArbolVacioExcepcion {
if (esVacio()) throw new ArbolVacioExcepcion(... Continue reading "Implementación de Árbol General en Java: Código Fuente Comentado" »

Structural Stability and Influence Lines Analysis

Classified in Design and Engineering

Written on in English with a size of 2.8 KB

Structural Stability

Stability depends on the capacity of the support. Ensure that the system is a structure, not a mechanism. Structures become unstable due to inadequate external support or loading.

Determining Stability

To determine stability, imagine a rigid body in a 2D coordinate system where each point is able to translate and rotate. We calculate the degree of freedom (DOF) using the following formula:

DOF = 3Rb - R - 2H

Conditions for Structural Instability

  • Parallel reactions
  • Concurrent forces

Influence Lines (IL)

An Influence Line (IL) is a graphic representation of the relationship between a component force, restraint reaction, or displacement value and the position of a unit force. There are two primary methods for development: the equilibrium... Continue reading "Structural Stability and Influence Lines Analysis" »

Linear Programming Constraints and Variables: Definitions and Effects

Classified in Design and Engineering

Written on in English with a size of 2.44 KB

Binding Constraint: LHS equals to RHS at optimal ;  Non-binding constraint: LHS is not equal to RHS at optimal

Shadow Price: Amount by which OFV changes if RHS is increased by one unit

Basic Variable: A decision variable which has non-zero value at optimal ;  Non-basic Value: A decision variable which has a value of zero at optimal

Reduced cost: Amount by which the objective function coefficient needs to be decreased before the variable becomes basic

  • Basic var: "Final Value" >0 and "Reduced cost"=0; With allow inc/dec, optimal solution (Final Value) doesn't change, OFV change by (change)*(Final Value); Beyond allow inc/dec, optimal solution and OFV changes by RESOLVE.
  • Non basic var:  "Final Value"=0 and "Reduced cost"≠0; In a MIN,"Reduced
... Continue reading "Linear Programming Constraints and Variables: Definitions and Effects" »

Digital Registers and Logic Family Specifications

Classified in Design and Engineering

Written on in English with a size of 2.95 KB

Digital Registers

As a flip-flop (FF) can store only one bit of data (a 0 or a 1), it is referred to as a single-bit register. A register is a set of FFs used to store binary data. The storage capacity of a register is the number of bits (1s and 0s) of digital data it can retain.

Loading a Register

Loading a register means setting or resetting the individual FFs—inputting data into the register so that their states correspond to the bits of data to be stored. Loading may be serial or parallel:

  • Serial loading: Data is transferred into the register in serial form, i.e., one bit at a time.
  • Parallel loading: Data is transferred into the register in parallel form, meaning all the FFs are triggered into their new states at the same time.

Types of Registers

  1. Buffer
... Continue reading "Digital Registers and Logic Family Specifications" »

Port Sizing and Operations: Key Factors and Considerations

Classified in Design and Engineering

Written on in English with a size of 1.81 KB

Port Sizing: Key Factors

Physical Factors

1. Oceanographic and Meteorological Conditions

These conditions define navigational restrictions. Wind conditions are classified as:

  • Soft: Up to 36 kph
  • Moderate: 36 - 63 kph
  • Severe: 63 - 108 kph

2. Vessel Dimensions

Design vessel dimensions (LOA, breadth, freeboard, draft) are crucial for port design.

3. Vessel Maneuverability

  • High: Light war vessels, cruises, bulk carriers, Ro-Ro vessels, first-generation containerships
  • Medium: Modern war vessels, oil carriers (T-2), bulk carriers, second-generation containerships
  • Low: Aircraft carriers, VLCC tankers, third and fourth-generation containerships, older or damaged vessels

4. Vessel Squat

Two main effects:

  • Vertical movement (sinking)
  • Longitudinal rotation

5. Vessel Movements

Tide... Continue reading "Port Sizing and Operations: Key Factors and Considerations" »

Ejercicios Resueltos de Programación en Java para Principiantes

Classified in Design and Engineering

Written on in English with a size of 3.08 KB

Ejercicio 1

import java.util.Scanner;

public class Ejercicio1 {
    public static void main(String[] args) {
        Scanner leer = new Scanner(System.in);
        int nota = 0;
        while (nota != -1) {
            System.out.println("Ingrese su nota del 1 al 20");
            nota = leer.nextInt();
            if (nota <= 20 && nota >= 18) {
                System.out.println("A");
            } else {
                if (nota >= 16 && nota < 18) {
                    System.out.println("B");
                } else {
                    if (nota >= 13 && nota < 16) {
                        System.out.println("C");
                    } else {
                        if (nota >= 10 &&
... Continue reading "Ejercicios Resueltos de Programación en Java para Principiantes" »

Java ArrayList Implementation Tutorial with Code Example

Classified in Design and Engineering

Written on in English with a size of 1.85 KB

Java ArrayList Implementation for Managing Names

This tutorial demonstrates how to use a Java ArrayList along with the Scanner class to store, check, and display names dynamically.

Java Source Code

import java.util.ArrayList;
import java.util.Scanner;

public class Lista_mod {

    public static void rellenaArray(ArrayList<String> lis) {
        String nombre;
        Scanner sc = new Scanner(System.in);
        do {
            System.out.println("Introduce nombres escribe salir para terminar");
            nombre = sc.nextLine().toLowerCase();
            if (!nombre.equals("salir"))
                lis.add(nombre);
        } while (!nombre.equals("salir"));
    }

    public static void compruebaNombre(ArrayList<String> lis) {
... Continue reading "Java ArrayList Implementation Tutorial with Code Example" »

Understanding Building Egress Requirements and Components

Classified in Design and Engineering

Written on in English with a size of 3.25 KB

Understanding Building Egress Requirements and Components

  • A means of egress must be an unobstructed path that leads a person safely out of a building. It must meet certain code requirements. Although escalators and elevators are part of general building circulation, codes do not allow them to be means of egress unless very specific requirements are met.
  • There are many situations where egress doors must swing in the direction of travel, e.g., occupant load greater than 49 or in hazardous occupancies. However, if the occupant load is less than 49, the required direction of door swing is not generally specified.
  • The opposite is true. They must be 10 feet wide, or more, to be considered a public way. (Width of an alley or sidewalk)
  • The main difference
... Continue reading "Understanding Building Egress Requirements and Components" »

Measuring River Load: Fieldwork Equipment and Methods

Classified in Design and Engineering

Written on in English with a size of 3.22 KB

Essential Equipment for River Load Analysis

You will need the following equipment for river load investigations:

  • Cord or washing line: To stretch across the river to act as the base-line for your investigations.
  • Tent pegs: To secure the base-line.
  • Metre rule: For measuring depth and distance.
  • Scoop: A dustpan may also be useful.
  • Scale of roundness: This will help you to pick out particular shapes in the materials you investigate. Five main shapes are recognized, and you can make a set from pencil erasers. Some patience will be needed! Label each eraser with indelible (waterproof) ink. Your reconnaissance visit will have shown whether you need all five shapes or just 'angular', 'sub-rounded', and 'well-rounded'.
  • Quadrat: For choosing river-bed material,
... Continue reading "Measuring River Load: Fieldwork Equipment and Methods" »

Comparison of Relational Algebra and Relational Calculus

Classified in Design and Engineering

Written on in English with a size of 1.36 KB

Relational Algebra and Relational Calculus

Relational Algebra and Relational Calculus are the formal query languages for a relational model. Both form the base for the SQL language which is used in most of the relational DBMSs. Relational Algebra is a procedural language. On the other hand, Relational Calculus is a declarative language. Relational Algebra and Relational Calculus can be further differentiated on many aspects, which I have discussed below with the help of a comparison chart.

BASIS FOR COMPARISONRELATIONAL ALGEBRARELATIONAL CALCULUS
BasicRelational Algebra is a Procedural language.Relational Calculus is a Declarative language.
StatesRelational Algebra states how to obtain the result.Relational Calculus states what result we have to
... Continue reading "Comparison of Relational Algebra and Relational Calculus" »