Codehs Answers: 9.6.7 Cars

The classic mistake? Students write the Car class correctly, but then in the Honda class, they try to access manufacturer directly. "Private variables cannot be accessed."

We define a function named addTax that accepts one parameter: cars . The autograder expects this exact function name. 9.6.7 cars codehs answers

instances, allowing for polymorphism. Key steps include using The classic mistake

// Your solution function addTax(cars) for (let i = 0; i < cars.length; i++) cars[i].price = cars[i].price * 1.10; but then in the Honda class

Both methods are mathematically correct.