Curriculum: Updates Needed in Javascript 7 - Object-Oriented Programming

Created on 5 Aug 2019  路  11Comments  路  Source: Techtonica/curriculum

The code here was misleading based on the information given above and below it. The audiobook class should extend the book class: "class AudioBook extends Book". The paragraph above the example should also clarify that the audiobook class is a subclass of book.

class Book {
  ...

  calculateDueDate(borrowedDate) {
    return borrowedDate.setDate(borrowedDate.getDate() + 21);  // 21 days is 3 weeks
  }
}

class AudioBook {
  ...

  calculateDueDate(borrowedDate) {
    return borrowedDate.setDate(borrowedDate.getDate() + 14);  // 14 days is 2 weeks
  }
}

In addition, the tutorial link sends me to the H1 roadmap instead of a tutorial: "Go through this tutorial".

For FAQs on how to contribute, see: https://github.com/Techtonica/curriculum#volunteering

EASY Hacktoberfest priority

Most helpful comment

@alodahl @yagosansz This file has not moved, but I did make significant changes to it recently.

All 11 comments

Hey @Reginatam429, I'll update this in two separate PRs. Looks like here they're probably referencing this tutorial.

I can adjust the wording and code above as well.

I've added two patches to the issues. I am concerned that the "Book" and "AudioBook" example isn't very clear (mostly because I'm not entirely sure this is an example that would play out in reality in this inheritance model...). If possible, I will try to remember to go back and update this with a more clear inheritance relationship. That's a big rewrite though.

Hi @bobbylcraig and @Reginatam429 , thanks for pointing this out and for the fixes. Should we make another issue about a rewrite?

@alodahl Depends how pressing of issues y'all make into issues? If you can add a low priority to it, that might be best :)

Yes, that鈥檚 fine @bobbylcraig, none of them are more pressing than this on the board. Would you mind making an issue since you know what鈥檚 missing?

@alodahl Will do!

Hi,
Is this issue still available? I would like to work on it!

Sure thing, @yagosansz .
@lalpert , is this one of the files that has moved?

@alodahl @yagosansz This file has not moved, but I did make significant changes to it recently.

@lalpert Are there any improvements or changes to be done? If so, would mind elaborating a bit more on it, please. =)
Thanks!

@yagosansz sorry for the delayed reply. No more improvements needed that I know of. I just created this issue also related to OOP if you'd be interested in doing it: https://github.com/Techtonica/curriculum/issues/1075

Was this page helpful?
0 / 5 - 0 ratings