Welcome to Dream.In.Code
Become a C++ Expert!

Join 149,493 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,332 people online right now. Registration is fast and FREE... Join Now!




c++

 
Reply to this topicStart new topic

c++, can someone help me with my course work plzz

mhezaki
20 Mar, 2007 - 03:25 PM
Post #1

New D.I.C Head
*

Joined: 20 Mar, 2007
Posts: 1


My Contributions
hello im not good in c++ sad.gif

so its hard to me to do my course work

write c++ program to store information on motorbikes for Zracing.
each motor bike will contain plate number, brand name,price, speed, any other info. data must be stored inside a file system


incude the following specification:

the program can store new bikes inside the system?
the program can search for a particular car information?
the program can update bike speed on a giveb plate number?
any two features other those statd above?

plz help me i dont know how to start this program sad.gif
User is offlineProfile CardPM
+Quote Post

NickDMax
RE: C++
20 Mar, 2007 - 07:32 PM
Post #2

2B||!2B
Group Icon

Joined: 18 Feb, 2007
Posts: 2,867



Thanked: 53 times
Dream Kudos: 550
My Contributions
how to start this program: Learn about file I/O in C++. You create a structure to hold the data, then you create an array of that structure. You get the user to give you some info, you open a file, write the info, close the file, and if the user wants to review the info, you open the file for reading, read the data into the array, close the file, and then display the information.

Other than that, read the forum rules. You need to post code.

This post has been edited by NickDMax: 20 Mar, 2007 - 07:34 PM
User is offlineProfile CardPM
+Quote Post

ajwsurfer
RE: C++
23 Mar, 2007 - 06:40 AM
Post #3

D.I.C Regular
Group Icon

Joined: 24 Oct, 2006
Posts: 298



Thanked: 2 times
Dream Kudos: 50
My Contributions
I would start by defining a struct to contain the motorbikes.
Then define the operations in a list like an outline.

You will need to find out from your instructor if you need to have the program store the information when the program is not running. If so, as NickDMax mentions, you will need to research and implement writing data to a file. (Probalbly easier that it first appears).

Next take each line in the outline mentioned above and start by making it into a function. You can go ahead and start testing minimal funtionality of each function right away, using the 'cout << "here is some data" ' statement.

So here is where I would start:
struct {
int plateNumber;
string brandName;
float price;
int speed;
// .. any other info.
} MotorBike;


User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 1/7/09 05:46PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month