python
Problem 1: Car Class
- Write a class named
Carthat has the following data attributes:__year_model(for the car’s year model)__make(for the make of the car)__speed(for the car’s current speed)- The
Carclass should have an__init__method that accepts the car’s year model and make as arguments. These values should be assigned to the object’s__year_modeland__makedata attributes. It should also assign 0 to the__speeddata attribute.
The class should also have the following methods: accelerate
Theacceleratemethod should add 5 to the speed data attribute each time it is called.brake
Thebrakemethod should subtract 5 from the speed data attribute each time it is called.get_speed
Theget_speedmethod should return the current speed.- Next, design a program that creates a
Carobject and then calls theacceleratemethod five times. After each call to theacceleratemethod, get the current speed of the car and display it. Then call thebrakemethod five times. After each call to thebrakemethod, get the current speed of the car and display it.
Problem 2: Personal Information Class
- Design a class that holds the following personal data: name, address, age, and phone number. Write appropriate accessor and mutator methods. Also, write a program that creates three instances of the class. One instance should hold your information, and the other two should hold your friends’ or family members’ information.
Needs help with similar assignment?
We are available 24x7 to deliver the best services and assignment ready within 3-4 hours? Order a custom-written, plagiarism-free paper

