CB100

Notas, resueltos y tps de la materia Algoritmos y Estructuras de Datos
Index Commits Files Refs README
tps/2/parada.cpp (695B)
   1 #include "parada.h"
   2 
   3 Parada::Parada(std::string calle,
   4         std::string direccion,
   5         double coordX, double coordY, std::vector<int> lineas) {
   6 
   7     this->calle = calle;
   8     this->coordX = coordX;
   9     this->coordY = coordY;
  10     this->direccion = direccion;
  11     this->lineas = new std::vector<int>(lineas);
  12 }
  13 
  14 std::string Parada::getCalle() {
  15     return this->calle;
  16 }
  17 
  18 std::string Parada::getDireccion() {
  19     return this->direccion;
  20 }
  21 
  22 double Parada::getCoordX() {
  23     return this->coordX;
  24 }
  25 
  26 double Parada::getCoordY() {
  27     return this->coordY;
  28 }
  29 
  30 std::vector<int> *Parada::getLineas() {
  31     return this->lineas;
  32 }
  33 
  34 void Parada::addLinea(int numero) {
  35     this->lineas->push_back(numero);
  36 }
  37 
  38 Parada::~Parada() {
  39     delete lineas;
  40 }