#include #include "ListOfParts.h" ListOfParts::ListOfParts() : size(0), Head(NULL) { } int ListOfParts::Count() { return size; } int ListOfParts::Add(CarPart* NewItem) { CarPart* Sample = new CarPart; Sample = NewItem; Sample->Next = Head; Head = Sample; return size++; } CarPart* ListOfParts::Retrieve(int Position) { CarPart* Current = Head; for(int i = 0; i < Position && Current != NULL; i++) { Current = Current->Next; } return Current; }