Hey guys!

I'm taking a C# class this semester and I've been struggling extremely bad. It's like, I can't get my mind to think simply, everything I think, I over think. When I'm doing labs, I can break down what I want each thing to do bit by bit, but I don't know how to tie it together, and I usually don't know where to start as far as Syntax goes.

So I'm working on this lab for class and the assignment is to create an abstract class that is inherited by the classes tank, boxcar, engine, and caboose. I have to be able to load things into the car and change the weight based on each car.

So what I've done so far is design the program in IDE, I have all the buttons laid out, and all my labels made, but I don't know where to go from here. My teacher's not really been so helpful as every time a question is asked, he somewhat scorns the student and makes him look like an idiot int he middle of the class. Needless to say, I avoid questions.

This is a screenshot of my layout: http://gyazo.com/2b4f7e7d7b3b29ba583805cbd61db2ac

The "Engine" "Tank" "Boxcar" and "Caboose" buttons should add a number to the total # of cars when clicked. The buttons below it should move you forward and backward int he selection, and the text box allows a numerical insertion that would adjust the weight of not only the car, but the total weight.

As far as coding goes, I've only created my classes and set the Tank, Boxcar, Engine, and Caboose classes to inherit the abstract class (In this case "Car.")

Thing is...I don't know where to go from here.

Can anybody help me do this kinda step by step?

Or help explain a solution to this in any way.

Next you should be thinking about the car class. What are the similarity's between all of the objects that inherit from it. What type of property's and/or field's do all these cars share. Also you can then think about what methods will all the cars have in common. Now you look at all the cars individually and think about what makes an Engine different, what values change, any extra fields or property's, and methods things like that.

This is a java tutorial but the concept is the same. It is what helped me in the beginning:
What is an Object

What is a class

What Is Inheritance

This article has been dead for over six months. Start a new discussion instead.