In-Class Programming 12 (Section 1) Create the following program to build a car class (car_class.py) and a program (InClassProgramming 12-1.py) to interact with this class: > Car class: o Three private data attributes: make, model, year (initialized with user value when creating object) One private data attribute speed initialized with zero (0) o • Mutator method for speed named accelerate, parameter accelerateSpeed, increment speed using parameter value o Mutator method for speed named brake, parameter brakeSpeed, decrement speed using parameter value o Accessor method get_speed to return the value of private data attribute speed o_str_method to produce output as shown below > Program: o Three user inputs as shown below, store in variables make, model, and year Create instance of car object and store in variable mycar o o Get user input of acceleration in mph and store in variable acceleration o Loop five times, within loop: . Call accelerate mutator of mycar and pass variable acceleration as argument Display speed by using get_speed accessor method of mycar (see output below) Similar to the previous user input and loop, we need to brake now because we are way too fast Get user input of braking speed in mph and store in variable braking o Loop five times, within loop: . • o At the end of your program, call_str_method and display its content Call brake mutator of mycar and pass variable braking as argument Display speed by using get_speed accessor method of mycar (see output below) Upload the following files to Canvas: > Screenshot of the executed code in command line terminal window (either pasted into a Word document or as an image) > Text files of your code named InClassProgramming12-1.py (put your name and section as comments at the top of file) Notes: > Upload the files (screenshot(s) and Python code as text file(s)) > Your code should contain some meaningful comments Your code should be well organized and formatted > Command Prompt temppypython teclasgrating12-1.p Please enter car's mate (examp * the aucaloration rate in I us drive, accelerate 24 Nissan): Honda le: Altino): civit too fast, need to brak... brake rate in miles per her: Car information: Model: Civic Year: 2001 Current 2000): 2001 par hours 12
In-Class Programming 12 (Section 1) Create the following program to build a car class (car_class.py) and a program (InClassProgramming 12-1.py) to interact with this class: > Car class: o Three private data attributes: make, model, year (initialized with user value when creating object) One private data attribute speed initialized with zero (0) o • Mutator method for speed named accelerate, parameter accelerateSpeed, increment speed using parameter value o Mutator method for speed named brake, parameter brakeSpeed, decrement speed using parameter value o Accessor method get_speed to return the value of private data attribute speed o_str_method to produce output as shown below > Program: o Three user inputs as shown below, store in variables make, model, and year Create instance of car object and store in variable mycar o o Get user input of acceleration in mph and store in variable acceleration o Loop five times, within loop: . Call accelerate mutator of mycar and pass variable acceleration as argument Display speed by using get_speed accessor method of mycar (see output below) Similar to the previous user input and loop, we need to brake now because we are way too fast Get user input of braking speed in mph and store in variable braking o Loop five times, within loop: . • o At the end of your program, call_str_method and display its content Call brake mutator of mycar and pass variable braking as argument Display speed by using get_speed accessor method of mycar (see output below) Upload the following files to Canvas: > Screenshot of the executed code in command line terminal window (either pasted into a Word document or as an image) > Text files of your code named InClassProgramming12-1.py (put your name and section as comments at the top of file) Notes: > Upload the files (screenshot(s) and Python code as text file(s)) > Your code should contain some meaningful comments Your code should be well organized and formatted > Command Prompt temppypython teclasgrating12-1.p Please enter car's mate (examp * the aucaloration rate in I us drive, accelerate 24 Nissan): Honda le: Altino): civit too fast, need to brak... brake rate in miles per her: Car information: Model: Civic Year: 2001 Current 2000): 2001 par hours 12
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
dsadadadada
python please

Transcribed Image Text:**In-Class Programming 12 (Section 1)**
Create the following program to build a car class (`car_class.py`) and a program (`InClassProgramming12-1.py`) to interact with this class:
### Car class:
- Three private data attributes: `make`, `model`, `year` (initialized with user value when creating object)
- One private data attribute `speed` initialized with zero (0)
- Mutator method for speed named `accelerate`, parameter `accelerateSpeed`, increment speed using parameter value
- Mutator method for speed named `brake`, parameter `brakeSpeed`, decrement speed using parameter value
- Accessor method `get_speed` to return the value of private data attribute speed
- `__str__` method to produce output as shown below
### Program:
- Three user inputs as shown below, store in variables `make`, `model`, and `year`
- Create instance of car object and store in variable `mycar`
- Get user input of acceleration in mph and store in variable `acceleration`
- Loop five times, within loop:
- Call accelerate mutator of `mycar` and pass `variable acceleration` as argument
- Display speed by using `get_speed` accessor method of `mycar` (see output below)
- Similar to the previous user input and loop, we need to brake now because we are way too fast
- Get user input of braking speed in mph and store in variable `braking`
- Loop five times, within loop:
- Call brake mutator of `mycar` and pass variable `braking` as argument
- Display speed by using `get_speed` accessor method of `mycar` (see output below)
- At the end of your program, call `__str__` method and display its content
### Upload the following files to Canvas:
- Screenshot of the executed code in command line/terminal window (either pasted into a Word document or as an image)
- Text files of your code named `InClassProgramming12-1.py` (put your name and section as comments at the top of file)
### Notes:
- Upload the files (screenshots) and Python code as text file(s)
- Your code should contain some meaningful comments
- Your code should be well organized and formatted
### Screenshot Explanation:
- The screenshot displays a command prompt window running `InClassProgramming12-1.py`.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education