Skip to content

Instantly share code, notes, and snippets.

View miguelsmuller's full-sized avatar
🧐
Ex nihilo nihil fit

Miguel Müller miguelsmuller

🧐
Ex nihilo nihil fit
View GitHub Profile
@miguelsmuller
miguelsmuller / airline_company.go
Last active May 9, 2022 15:21
Selling AirLine Tickets
/*
Larisse Rodrigues
Marcel Pontes
Miguel Muller
Taís Amanda
*/
package main
import (
@miguelsmuller
miguelsmuller / quick_functions.ts
Last active May 9, 2022 15:21
Quick Functions in TypeScript
// WAIT
const wait = (ms: number): Promise<void> => new Promise((resolve) => setTimeout(resolve, ms));
//await wait(1000); // waiting 1 second
// IS WEEKDAY
const isWeekday = (d: Date): boolean => d.getDay() % 6 !== 0;
//isWeekday(new Date(2022, 2, 21)); // -> true
//isWeekday(new Date(2021, 2, 20)); // -> false
public class Pessoa {
private Departamento departamento;
public Pessoa(Departamento departamento) {
this.departamento = departamento;
}
// RESPEITA a Lei de Demeter
public String obterNomeChefeDaEquipe() {
return departamento.obterNomeDoGerente();