Create a file with the name car.py to store information about a single Car Class. The Car object needs to include the following information: Car name Car vin number Car make Import the Car class into the main.py. Inside the main portion of the code, create a Car object, car1, that has the name "Car", vin "111", and the make "Honda". Print the car information to the commandline and make sure that your code is working correctly. Create a file with the name linkedlist.py. This file will contain the linked list class and the node class as well. The linkedlist.py file needs to import the Car class Create a class Node to represent a single node in the linked list. The class will be inside the linkedlist.py file. The Node class will include the following: A next pointer to hold the address of the next node. You need to set this variable to None A car variable to hold the car objects. Test your Node class in the main. Create a Car object car1. Set the name of the car, vin, and model Create a Node object node. Assign node.car to the car1 object Print node.car information to make sure that everything was assigned correctly Now you are ready to implement the LinkedList class Create a LinkedList class The class needs to include a head and a tail, and count. Implement two functions: insert and print_list The insert function takes the car information as input: name, vin, and make. It creates a car object to store that information, then it creates a node to store the car object, then it adds that node to the LinkedList (refer to the code in the lecture to know how to add the node to the LinkedList) The print_list function traverse through the LinkedList and print all car objects. Finally, import the LinkedList class to the main. Create a LinkedList object and test your LinkedList. Call the insert function twice with the following information: ll.insert("car1", 111, "Honda"), ll.insert("car2",222, "Toyota"). Then, call ll.print_list() function to print all the information inside your LinkedList

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
icon
Related questions
Question
100%
Create a file with the name car.py to store information about a single Car Class. The Car object needs to include the following information: Car name Car vin number Car make Import the Car class into the main.py. Inside the main portion of the code, create a Car object, car1, that has the name "Car", vin "111", and the make "Honda". Print the car information to the commandline and make sure that your code is working correctly. Create a file with the name linkedlist.py. This file will contain the linked list class and the node class as well. The linkedlist.py file needs to import the Car class Create a class Node to represent a single node in the linked list. The class will be inside the linkedlist.py file. The Node class will include the following: A next pointer to hold the address of the next node. You need to set this variable to None A car variable to hold the car objects. Test your Node class in the main. Create a Car object car1. Set the name of the car, vin, and model Create a Node object node. Assign node.car to the car1 object Print node.car information to make sure that everything was assigned correctly Now you are ready to implement the LinkedList class Create a LinkedList class The class needs to include a head and a tail, and count. Implement two functions: insert and print_list The insert function takes the car information as input: name, vin, and make. It creates a car object to store that information, then it creates a node to store the car object, then it adds that node to the LinkedList (refer to the code in the lecture to know how to add the node to the LinkedList) The print_list function traverse through the LinkedList and print all car objects. Finally, import the LinkedList class to the main. Create a LinkedList object and test your LinkedList. Call the insert function twice with the following information: ll.insert("car1", 111, "Honda"), ll.insert("car2",222, "Toyota"). Then, call ll.print_list() function to print all the information inside your LinkedList
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Unreferenced Objects
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
Recommended textbooks for you
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education