Skip to content

This program keeps track of donated computer parts in C#. It utilizes a GUI and includes Object Oriented Programming Principles.

Notifications You must be signed in to change notification settings

adrianco12/Computer-Donation-Project

Repository files navigation

This project keeps track of donated computer parts in C#. It includes a GUI, and utilizes Object Oriented Programming Principles.

There are 7 classes in this program. The base class, Parts, has private fields for general part information (vendor, price, make, model, comments), an overloaded constructor, and a virtual get data method that returns a string of data separated by commas. All other classes (CPU, GPU, RAM, Motherboard, Cables, Other) inherit from this base class. These derived classes use the overloaded base class constructor and override the get data method from the base class. For the form, once the user presses ‘submit’ the program determines which part they are submitting via a combo box, and creates an object of the specified class. Exception handling determines if the user’s input is valid. It then calls the get data method from said class and writes it to a CSV file. In form 2, a stream reader object is used to read from the CSV file. Each line of the file is read until a null value is reached, and each line is split at the comma and created into an array. Lastly, this array is appended as a row on the data grid view in form 2.

About

This program keeps track of donated computer parts in C#. It utilizes a GUI and includes Object Oriented Programming Principles.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages