Coder Social home page Coder Social logo

everyday-things's Introduction

everyday-things

CPS206 Iterative In Class Examples

Purpose

This repository is for students of CPS206 at John A Logan College in the Spring 2017 semester to have in class examples correctly completed for them.

Cloning

Clone this repository with the shell command git clone https://github.com/anthonykulis/everyday-things.git

Forking

If you wish to contribute to this source code, please fork the repository via github. From there, you are free to contribute with pull requests.

If you need to update your fork with the current in class work, use git pull https://anthonykulis/everyday-things.git master

Versioning

This repository will follow semantic versioning. This means as we continue with lectures, I will update the repository with either minor or micro tag updates. Each version will update this read me about the changes we accomplished in that lecture.

Versions

The following are the versioning changelogs.

Version 0.1.4

We identified that the toString methods are repetitive and that we could use polymorphism to allow us to stay DRY.

Because of this, we need to do a lot of refactoring. First, we need to create a Liquid. From that Liquid, we need create Beverage which extends Liquid, and Soda and Beer extend Beverage. But because Water is not only a Beverage, we need to move that class out of beverage and into the liquid package. Maybe later Water will identify which package is correct for it, but until then, moving it into Liquid is satisfactory.

We also decided to change our beverages so we can keep using declarative accessor methods, e.g. sodaBottle.getSoda() vs sodaBottle.getLiquid(). In the process, we discover that WaterBottle's constructor cannot pass a Liquid to a Beverage because a Liquid is not a Beverage.

This forces us to move WaterBottle out of Beverage. But now we have an issue of repetition that needs to be solved. This issue will be an extra credit assignment due Friday, March 3, 2017 at midnight. Simply for the repository and once you have made the changes, do a pull request. Those correct solutions will be given 5 points.

Version 0.1.3

We demonstrated that we can polymorph into bottles and that the latest toString method would resolve and that each child class can use getCapacity. Then we introduced the HandSanitizerBottle. This led us to the conclusion that we needed to refactor some to prevent us from drinking hand sanitizer on accident. This version reminds us what we did.

Version 0.1.2

In this version, we introduced the basic usage of polymorphsim. We create a basic main driver to put a bunch of bottles into a collection.

Version 0.1.1

We decied that Bottle should be be intantiated, so we set the class to abstract

Version 0.1.0

We realized we had duplicate code. Because of so, we decided to abstract out those features and put them into a parent class named Bottle, and extend Bottle into our 3 bottle-typed classes.

Version 0.0.2

This version simply adds the toString methods which were required.

Version 0.0.1

Adds base objects of SodaBottle, BeerBottle, WaterBottle with no inheritance. Also provides empty objects of Soda, Beer, and Water for has-a relationships.

Version 0.0.0

Initial - no code.

everyday-things's People

Contributors

anthonykulis avatar hodge-zf avatar

Watchers

James Cloos 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.