Answered step by step
Verified Expert Solution
Question
1 Approved Answer
so I have a class for an array list which will be my container. I have a second class which is for objects to make
so I have a class for an array list which will be my container. I have a second class which is for objects to make cars. I had to make a text file with 15 cars in each car has a serial number, make, model, and color. Each car is on its own line on the text file. I know I need to use the getline() function in C++ but I'm having trouble splitting the serial number, make, model, and color because the container will hold each car but each car for the constructor has four parameters and since the first parameter is an integer for the serial number I don't know how to do this. Please help. I am not using vectors either since we are doing array list. I need to add each vehicle that's on the text file to my container that holds cars objects
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started