Coder Social home page Coder Social logo

m10-hw12-stanley-ezra's Introduction

I looked at the linked W3 documentation and reviewed videos from the module for help. I spent half an hour trying to fix an error before realizing I spelled something wrong.

ES6 Classes

 

Background

For this assignment you are being tasked with creating a Car constructing class in JavaScript.

 

Setup

Please create a git repository titled m10-hw12-lastname-firstname and clone the repo to your computer. Copy the files from the unsolved folder into the root directory of your cloned repository. Write your code in the index.js file that has been provided.

There are tests included in this assignment. You can run the tests using the index.html file with the live server extension. When you have completed the assignment, all tests should pass.

 

Instructions

Your assignment is to create a class named Car in JavaScript. This class will create objects that have three properties:

  1. make (String) - The car's manufacturer. E.g. Honda
  2. model (String) - The type of model. E.g. Civic
  3. year (Integer) - Four digit year the car was made. E.g. 1998

Your class should also have the following methods:

  • honk - This method should log "BEEP BEEP!" to the console when called.
  • performMaintenance - This method should use the setTimeout function to log "maintenance complete" to the console after exactly 3 seconds.

After you have created your Car class do the following in the order listed below:

  1. Create a variable named mySweetRide and assign it a car created with your class using the following arguments:
    • make: 'Pontiac'
    • model: 'Fiero'
    • make: 1988
  2. call mySweetRide's honk method once
  3. call mySweetRide's performMaintenance method once

Running the index.html will run the included tests for this assignment. All of the tests should pass when you have completed the requirements listed above.

 

Deployment

Your code must be deployed to GitHub Pages. To deploy a repository to GitHub pages you must

  1. Ensure your repository has an index.html file in the root directory.
  2. Navigate to the settings section of the repository.
  3. Click on pages in the left navigation menu.
  4. Under source click the dropdown and select your master or main branch.
  5. Click save.

Your site should be deployed to <your github username>.github.io/<your repository name> in 5-10 minutes.

 

Submission

Please submit both a link to your repository and a link to the live site. Also please include any comments on stumbling blocks or difficulties encountered while completing the assignment.

 

Resources

This assignment will test your ability to write ES6 classes and utilize the setTimeout function.

Classes:

setTimeout:

m10-hw12-stanley-ezra's People

Contributors

seltzerfan24 avatar

Watchers

 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.