Giter Site home page Giter Site logo

ap2-moduls's Introduction

Activitat de mòduls i compilació separada per AP2

Guió de l'activitat

  1. Descarregueu el repositori amb l'activitat: git clone https://github.com/jordi-petit/ap2-moduls.

  2. Entreu al directori ap2-moduls i compileu el projecte amb make.

  3. Proveu el programa principal.

    Exemple d'entrada:

    point_def p 3 4
    point_copy q p
    point_get_x q
    point_get_y q
    point_add q p
    point_get_x q
    point_get_y q
    

    Exemple de sortida:

    3
    4
    6
    8
    
  4. Investigueu el fitxer Makefile. Proveu d'esborrar algun fitxer .o i recompileu de nou amb make. Mireu els fitxers al vostre directori. Proveu un make clean.

  5. Estudieu el mòdul Point amb la seva especificació a Point.hh i la seva implementació a Point.cc. Fixeu-vos en el patró del #ifdef ... #endif al .hh i la definició dels mètodes al .cc.

  6. Estudieu ara el mòdul Rectangle, que es dóna mig implementat: La seva interfície a Rectangle.hh és sencera però la seva implementació a Rectangle.cc és incompleta. Completeu-la.

  7. Estudieu el programa principal main.cc. La part del tractament de rectangles és incompleta. Completeu-la.

  8. Mireu el fitxer README.md com està escrit en Markdown.

  9. Si teniu temps, estudieu ara el mòdul Circle, de qual només es dóna la seva interfície. Completeu la seva implementació i completeu el programa principal perquè l'utilitzi.

ap2-moduls's People

Contributors

jerry-master avatar jordi-petit avatar polbaladas 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.