
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
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 stepSolved 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.Similar questions
- c++ Language I need help with question #6 part c please. **WITHOUT "DP" please. I keep getting dp in the answers from you guys and it's very confusing and i can't use that please. Don't use "DP" please and thank you so much. I asked this question 3 times but i keep getting programs im not able to run. Please make it as simple as possible for me thank you so so much. I did a and b already, i just need with c using dynamic programming. Please and thanks!arrow_forwardCode in C language. Follow instructions in photo. Use text provided as input.txt file. A1, A2 20294 Lorenzana Dr Woodland Hills, CA 91364 B1, B2 19831 Henshaw St Culver City, CA 94023 C1, C2 5142 Dumont Pl Azusa, CA 91112 D1, D2 20636 De Forest St Woodland Hills, CA 91364 A1, A2 20294 Lorenzana Dr Woodland Hills, CA 91364 E1, E2 4851 Poe Ave Woodland Hills, CA 91364 F1, F2 20225 Lorenzana Dr Los Angeles, CA 91111 G1, G2 20253 Lorenzana Dr Los Angeles, CA 90005 H1, H2 5241 Del Moreno Dr Los Angeles, CA 91110 I1, I2 5332 Felice Pl Stevenson Ranch, CA 94135 J1, J2 5135 Quakertown Ave Thousand Oaks, CA 91362 K1, K2 720 Eucalyptus Ave 105 Inglewood, CA 89030 L1, L2 5021 Dumont Pl Woodland Hills, CA 91364 M1, M2 4819 Quedo Pl Westlake Village, CA 91362 I1, I2 5332 Felice Pl Stevenson Ranch, CA 94135 I1, I2 5332 Felice Pl Stevenson Ranch, CA 94135 N1, N2 20044 Wells Dr Beverly Hills, CA 90210 O1, O2 7659 Mckinley Ave Los Angeles, CA 90001arrow_forwardNeed help in writing the code in Python!arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

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