SOURCE CODE:
Car.py
class Car:
def __init__(self, make="Ford", color="black",year=1910):
self.make = make
self.color = color
self.year = year
def __eq__(self,other):
if(self.make==other.make and self.color==other.color and
self.year==other.year):
return True
else:
return False
def __str__(self):
return("("+str(self.color)+","+str(self.year)+","+str(self.make)+")")
List.py
from Car import *
class List:
class Link:
def __init__(self,car):
self.car=car
self.next=None
def __init__(self):
self.head = None
def addCar(self,make,color,year):
car=Car(make,color,year)
link=self.Link(car)
link.next=self.head
self.head=link
def findCar(self,make,color,year):
car=Car(make,color,year)
itr=self.head
flag=0
while(itr!=None):
if(itr.car==car):
flag=1
return True
itr=itr.next
if(flag==0):
return False
def removeHead(self):
if(self.head==None):
return False
temp=self.head
self.head=self.head.next
return temp.car
def __str__(self):
stri=""
itr=self.head
while(itr!=None):
stri+=str(itr.car)
stri+="\n"
itr=itr.next
return stri
def __len__(self):
count=0
itr=self.head
while(itr!=None):
count+=1
itr=itr.next
return count
Test.py
from List import *
list1=List()
list1.addCar("a","blue",1991)
list1.addCar("aa","ablue",1991)
list1.addCar("b","balue",1991)
print(list1.findCar("b","baalue",1991))
list1.removeHead()
print(len(list1))
print(list1)
Screenshots:

Using Python. You will create two classes and then use the provided test program to make sure your program works This m...
Language = C++ How to complete this code? C++ Objects, Structs and Linked Lists. Program Design: You will create a class and then use the provided test program to make sure it works. This means that your class and methods must match the names used in the test program. Also, you need to break your class implementation into multiple files. You should have a car.h that defines the car class, a list.h, and a list.cpp. The link is a struct...
Use BlueJ to write a program that reads a sequence of data for several car objects from an input file. It stores the data in an ArrayList<Car> list . Program should work for input file containing info for any number of cars. (You should not assume that it will always be seven lines in the input file). Use notepad to create input file "inData.txt". File should be stored in the same folder where all files from BlueJ for this program...
For Java Program In this lab you will gain experience using all the concepts we learned to this point, which include classes, methods, collections, and file input/output. Also, you will gain experience in team programming. This assignment will be completed by teams of 2. Each member must complete an equal amount of the work in order to receive credit for this assignment. You must write the programmer’s name in a comment for each method you write. You need to create...
Java Create a program for a car dealer to use where you have a class for Salesman, Cars, and the Records of sale. 4 salesman and 4 cars to start with but have array size for 50 cars, have space for 100 records in array. The program should have 6 options in the menu. buy car, sell car, show inventory, show salesman, show sales records, and exit. Salesman class - Name, ID number, Commision rate, Total commisions earned, Totals number...
Create a python program based on the following requirements the program should also have to have the following Base Class - Car (Make, Model, year) Sub Class - Gas (Make, Model, year, and gas per mile) Sub Class - Electric (Make, Model, year, and Full Battery charged per mile) 1. Add car 2. View car 3. Delete car 4. Exit program 1. The Car sell manager Application will need to store the car information for gas-powered car members and electric-powered...
*** FOR A BEGINNER LEVEL JAVA CLASS, PLEASE KEEP CODE SIMPLE, AND WE USE BLUE J IN CLASS (IF IT DOESNT MATTER PLEASE COMMENT TELLING WHICH PROGRAM YOU USED TO WRITE THE CODE, PREFERRED IS BLUE J!!)*** ArrayList of Objects and Input File Use BlueJ to write a program that reads a sequence of data for several car objects from an input file. It stores the data in an ArrayList<Car> list . Program should work for input file containing info...
Use your Car class from the previous Programming Assignment. For this assignment, create a new class that represents a Used Car Dealership. Your Java program will simulate an inventory system for the dealership, where the employees can manage the car information. Start by creating an array of 10 cars, with an "ID" of 0 through 9, and use the default constructor to create each car. For example, the third car in an array called cars would have ID 2. You...
Exercise 11 - in Java please complete the following:
For this exercise, you need to work on your own. In this exercise you will write the implementation of the pre-written implementation of the class CAR. The class CAR has the following data and methods listed below: . Data fields: A String model that stores the car model, and an int year that stores the year the car was built. . Default constructor . Overloaded constructor that passes values for both...
IntList Recursion Assignment Specifications: You will add some additional recursive functions to your IntList class as well as make sure the Big 3 are defined. IntNode class I am providing the IntNode class you are required to use. Place this class definition within the IntList.h file exactly as is. Make sure you place it above the definition of your IntList class. Notice that you will not code an implementation file for the IntNode class. The IntNode constructor has been defined...