Skip to content

Class#2

Open
OKiMaureen wants to merge 2 commits intodevelopfrom
class
Open

Class#2
OKiMaureen wants to merge 2 commits intodevelopfrom
class

Conversation

@OKiMaureen
Copy link
Owner

What does this PR do

It is shows the implementation of OOP

###Description of the task to be completed
It shows how to implement OOP in areal life scenerio

How should this e manually tested

By navigating to the main.js page

Any background context you want to provide

N/A

this.color =color;
this.type =type;
this.year =year;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These variables are not private

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, with the way you assigned 'Vehicle' to this.name. that means all classes inherited will always have 'vehicle' as the name. I'm not sure that's what you intended to do.


}
//instatiating a car model of a vehicle
let v = new Vehicle(red,car);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a good variable name, variable names should be descriptive





No newline at end of file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always end your files with a new line

it('it should be a string', () => {
assert.typeOf(result, 'string')
});
});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You wrote tests but your tests are not running because you didn't update your package.json with the test script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants