Code:
/*:::::::::::::::::::::::::::::::::::::::::::::::::
STRUCTURES
:::::::::::::::::::::::::::::::::::::::::::::::::*/
struct CarStructure
{
double vin;
char *make;
char *model;
int year;
char *colour;
struct TechInfo
{
int cylinder;
int horse;
int engine;
};
struct ListNode *Next;
struct ListNode *Prev;
};
typedef struct CarStructure CarNode;
typedef CarNode *CarNodePtr;
/*:::::::::::::::::::::::::::::::::::::::::::::::::
ARRAYS
:::::::::::::::::::::::::::::::::::::::::::::::::*/
/*:::::::::::::::::::::::::::::::::::::::::::::::::
PROTOTYPES
:::::::::::::::::::::::::::::::::::::::::::::::::*/
void ViewCarInfo(CarNodePtr*, double, char*, char*, int, char*, int, int, int);
void AddCarInfo(CarNodePtr*, double, char*, char*, int, char*, int, int, int);
void EditCarInfo(CarNodePtr*, double, char*, char*, int, char*, int, int, int);
void DeleteCarInfo(CarNodePtr*, double, char*, char*, int, char*, int, int, int);
/*:::::::::::::::::::::::::::::::::::::::::::::::::
MAIN
:::::::::::::::::::::::::::::::::::::::::::::::::*/
int main()
{
CarNode * Start;
CarNode * Newnode;
int choice;
while(choice != 5)
{
Console::WriteLine(":::Welcome to the Car Info Program:::");
Console::WriteLine("Please Select an Option:");
Console::WriteLine(" - 1 - View Car Info");
Console::WriteLine(" - 2 - Add Car Info");
Console::WriteLine(" - 3 - Edit Car Info");
Console::WriteLine(" - 4 - Delete Car Info");
Console::WriteLine(" - 5 - End Program");
choice = Convert::ToInt32(Console::ReadLine());
Console::WriteLine("");
switch(choice)
{
case 1:
void ViewCarInfo();
break;
case 2:
void AddCarInfo();
break;
case 3:
void EditCarInfo();
break;
case 4:
void DeleteCarInfo();
break;
default:
Console::WriteLine("ERROR: Pitiful Human, This Number IS NOT An Option!");
Console::WriteLine("");
break;
}
}
}
/*:::::::::::::::::::::::::::::::::::::::::::::::::
VIEWCARINFO
:::::::::::::::::::::::::::::::::::::::::::::::::*/
void ViewCarInfo(CarNodePtr *ViewPtr, double vin, char *make, char *model, int year, char *colour, int cylinder, int horse, int engine)
{
if (Start == NULL)
{
Console::WriteLine("ERROR: Please Enter a Car First.");
}
else
{
struct CarNode * Current;
Current = Start;
while (Current -> Next != NULL)
{
Console::Write("VIN: ");
Console::WriteLine(Current -> vin);
Console::Write("Make: ");
Console::WriteLine(Current -> *make);
Console::Write("Model: ");
Console::WriteLine(Current -> *model);
Console::Write("Year: ");
Console::WriteLine(Current -> year);
Console::Write("Colour: ");
Console::WriteLine(Current -> *colour);
Console::Write("Cylinders: ");
Console::WriteLine(Current -> cylinder);
Console::Write("Horsepower: ");
Console::WriteLine(Current -> horse);
Console::Write("Engine: ");
Console::WriteLine(Current -> engine);
Current = Current -> Next;
Console::WriteLine();
}
Console::Write("VIN: ");
Console::WriteLine(Current -> vin);
Console::Write("Make: ");
Console::WriteLine(Current -> *make);
Console::Write("Model: ");
Console::WriteLine(Current -> *model);
Console::Write("Year: ");
Console::WriteLine(Current -> year);
Console::Write("Colour: ");
Console::WriteLine(Current -> *colour);
Console::Write("Cylinders: ");
Console::WriteLine(Current -> cylinder);
Console::Write("Horsepower: ");
Console::WriteLine(Current -> horse);
Console::Write("Engine: ");
Console::WriteLine(Current -> engine);
}
Console::WriteLine();
}
Currently me and about 4 other people are sitting down trying to figure this out. Yes, it's sad we can't even get this, and we realize it - hense why we need help.