Coder Social home page Coder Social logo

d-holguin / mooc-java-programming-i Goto Github PK

View Code? Open in Web Editor NEW
39.0 0.0 19.0 647 KB

University of Helsinki’s free massive open online course (MOOC) completed exercises. 2020 solutions

Home Page: https://java-programming.mooc.fi/

License: GNU General Public License v3.0

Java 100.00%
java mooc solutions excercises education 2020 mooc-java-part-1-solutions-2020

mooc-java-programming-i's People

Contributors

d-holguin avatar sc8er avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mooc-java-programming-i's Issues

test

this is a test issue

Bug fixed - java programming 1 Part 06_13.exercise

In ExerciseManagementTest.java,
you commented:

    @Test
    public void exerciseCanBeMarkedAsCompleted() {    
        management.add("New exercise");    
        management.markAsCompleted("New exercise");    
        assertTrue(management.isCompleted("New exercise"));
        //this test fails because of the add method not correctly addeding im assumeing the beleow test doesnn't work as intened as well.
        // ill try to fix it and understand it sometime later. I spent too long loocking into it right now
    }

The reason it doesn't work is because in Exercise class, the method

	public void setCompleted(boolean completed) {
		completed = completed;
	}

It has to code like this, where this.completed = completed;

	public void setCompleted(boolean completed) {

		this.completed = completed;
	}

It's because the parameter is named completed, so you have to use this.completed to specify your boolean value. Then the bug is fixed.

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.