Skip to content

This repository is created for day 6 task regarding OOPS concept.

Notifications You must be signed in to change notification settings

manu-git-b-s/day_6_task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

day_6_task

This repository is created for day 6 task regarding OOPS concept.

  1. Create a movie object which has title,studio and rating as properties --> the answer for this question is in the file movies.js
  1. Create a circle object which has radius and color as properties --> the answer for this question is there in the file circle.json

    • created the class with color an object as contructor properties
    • also created setters and getters for radius and color properties
    • tostring() method to display radius and color of a Circle object
    • getArea and getCircumference to get area and circumference of a circle respectively.
  2. Write a “Person” class to hold all the details. --> the answer for this question is there in the file person.js

    • In this file a resume can be generated if we give all the details required in the constructor function of the "Person" class.
  3. Write a class to calculate the Uber price. -> the answer for this question is there in the file uberPrice.js

    • the Uber class has the follwing constructor properties that describe about the car -carModel -carType -color -registrationNumber

    • getPrice() function takes in distance, demandPrice, pricePerKm as arguments and return the fare for a ride.

About

This repository is created for day 6 task regarding OOPS concept.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published