Skip to content

Instantly share code, notes, and snippets.

View Hikhuj's full-sized avatar

Róger José Ulate Rivera Hikhuj

View GitHub Profile
@Hikhuj
Hikhuj / iterm2-solarized.md
Created September 11, 2020 03:53 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

public void elimina(String nombre, String marca) {
Nodo aux = cabeza;
// Evaluar si AUX esta vacida
if(aux != null){
// Evaluar si el primero cumple condicion
if(nombre.equals(aux.getDato().getNombre()) && marca.equals(aux.getDato().getMarca())){
cabeza = aux.getNext();
ultimo.setNext(cabeza);
// Opciones: Menu principal
public String opcionesMenuPrincipal() {
String resultado = "Menu Principal:"
+ "\n1. Agregar alumno nuevo"
+ "\n2. Buscar alumno por nombre"
+ "\n3. Eliminar alumno por id"
+ "\n4. Promedio de notas, mujeres y hombres"
+ "\n5. Nota mas alta y baja (Mujeres)"
+ "\n6. Nota mas alta y baja (Hombres)"
Lista l = new Lista();
l.inserta(new Pelicula("Blanca N", "Director1", 180, 1980));
l.inserta(new Pelicula("Batman", "Director2", 190, 1995));
l.inserta(new Pelicula("The Matrix", "Director1", 200, 2001));
l.inserta(new Pelicula("Thor", "Director4", 150, 2001));
l.inserta(new Pelicula("Avengers", "Director1", 180, 2010));
l.inserta(new Pelicula("Ban", "Director1", 180, 2019));
l.inserta(new Pelicula("CerCo", "Director2", 190, 1980));
l.inserta(new Pelicula("Animalia", "Director1", 200, 1900));
//Practica 2: public void elimina (int year)
public void elimina(int anio){
Nodo aux = cabeza;
// Si ELIMINAR primer dato
if(anio == aux.getDato().getAnios()){
cabeza = aux.getNext();
aux = null;
}
@Hikhuj
Hikhuj / Cola.java
Created February 9, 2019 20:41
Cola.java
public void extrae(String modelo) {
Nodo aux = frente;
// Recorrer la COLA
while(aux != null) {
// Evaluar si algun item de la COLA es igual a MODELO
if(modelo.equals(aux.getDato().getModelo())) {
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package fundamentosproyectofinal;
import java.io.*;
import java.util.*;