GithubHelp home page GithubHelp logo

tda553-lab1's Introduction

TDA553-LAB1 ( Laboration 1 )

First version UML diagram First UML

Imroved UML diagram Imroved UML

Reflection for lab1 can be seen here. Reflection for lab2 can be seen here.

Authors:

  • Alessandro
  • Ismail

tda553-lab1's People

Contributors

ismail424 avatar niklasbroberg avatar berrat avatar anon-02 avatar erikdsjostrom avatar

tda553-lab1's Issues

Lab1: Task 3 (CRITICAL)

CRITICAL: The following methods must each be used in at least one test.
gas
brake
move
turnLeft
turnRight

  • StartCars() doesn’t have any assertions.

  • MoveCars() only tests if the car position has changed. It is possible that the test has a bug but the test still passes. Can you think of a way to strengthen the test?

Lab 2: General

“Interfaces” isn’t a cohesive package. They should usually be in the same package(s) as the classes that implement it.

Lab 2: Task 1 & Task 2

TransportVehicle:

  • Instance variables should be private, not protected. Use getters/setters instead.

  • LowerPlatform and raisePlatform need an else statement, otherwise they don’t do anything.

CarTransporter:

  • Car's location does not change when the CarTransporter moves.
  • startEngine( ) only starts the vehicle if the platform is down, not up. Should be the opposite.
  • Consider what would happen if I were to try unloading or loading the same car twice.

Lab1: Task 1: OCP

It might be better to put the code involving turbo into its own class which Saab95 inherits from or delegates to. Then we could create a new car with turbo without modifying or duplicating code.

It might also be better to put the code involving trim into its own class which Volvo240 inherits from or delegates to. Then we could create a new car with trim without modifying or duplicating code.

Lab 2: Task 4 (CRITICAL)

  • CRITICAL: Contract for gas() is misunderstood.

  • Even though we haven’t asked specifically, please demonstrate your understanding of the LSP by saying what the contract for startEngine() is in IVehicle, and whether its implementation in Volvo and Scania satisfy LSP.

Lab 2: Task 3 CRITICAL

  • CRITICAL: Can load more than maximum capacity of cars.

  • The loadedVehicles list is protected, and can thus be altered anywhere in the package. Should be private.

  • Consider what happens if I were to try unloading or loading the same car twice. Add a comment to the code about that.

  • CRITICAL: Duplicated code exists between CarTransporter and RepairShop (load/unload methods).

Lab 1: Task 4 (CRITICAL)

CRITICAL: It is possible to violate a sanity check by calling public methods.

currentSpeed is package protected (as are the rest of the instance variables). This means that within the package, it’s public, and can thus be directly changed.

Lab 3 General Comments

Good job on this lab - I will not be giving any critical issues. For the future, I recommend:

  • Having all button and listener code in the controller class(es).
  • Moving public static void main(String[] args) out of controller and into an app class or similar.

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.