GithubHelp home page GithubHelp logo

macowins's Introduction

Diseño de Sistemas 2022 - Macowins

Integrantes

Alumno Legajo
Bruno Juan Pablo 1768920
Buffoni Julian 1756760
Fusse Fausto 1757519
Gette Delfina 1722712
Riquelme Blaffet Pablo Daniel 1632784

Pseudocodigo

Prendas

class Prenda {
    var nombre
    var tipo
    var precioBase
    var estadoPrenda

    method calcularPrecio(){
        return estadoPrenda.calcularPrecio(precioBase)
    }

}

Estados de Prenda

object nueva {

    method calcularPrecio(precioBase){
        return precioBase
    }

}

class Promocion {

    var valorFijo

    method calcularPrecio(precioBase){
        return precioBase - valorFijo
    }

}

object liquidacion {

    method calcularPrecio(precioBase){
        return precioBase / 2
    }

}

Ventas

object macowins {
    var ventas

    method gananciasDelDia(fecha){
        var ventasDelDia = ventas.filter { unaVenta => unaVenta.fecha() == fecha }
        return ventasDelDia.sum {unaVenta => unaVenta.precioFinal()}
    }

    method precioPrenda(prenda){
        return prenda.calcularPrecio()
    }
}
class Venta {
     var prendas
     var fecha
     var formaDePago

     method calcularSubtotal() {
          return prendas.sum {unaPrenda => unaPrenda.calcularPrecio()}
     }

     method precioFinal() {
          return formaDePago.precioFinal(this.calcularSubtotal())
     }
}

Formas de Pago

object efectivo {
     method precioFinal(subtotal) {
          return subtotal
     }
}

class Tarjeta {
     var cantidadCuotas
     var coeficiente

     method precioFinal(subtotal) {
          var recargo = cantidadCuotas * coeficiente + subtotal * 0.01
          return subtotal + recargo
     }
}

macowins's People

Contributors

delfigette avatar faustofusse avatar juampibruno avatar julianbuffoni avatar priquelme avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.