473,383 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Programme Help

I am trying to make a small system to record details for a small video
/ DVD shop - approx 200 members @ the mo

I wanted it to be able to do the following:

Check out a video / DVD
Return video / DVD
Add a new Video / DVD to stock
Remove a Video / DVD from stock
Display all Video / DVD in stock
Display member details
I've made the Menu, but I am stumped as to how I can go about the rest
of the programmes & link them to the menu.

Storage of the details would be in a number of *.dat files
(hopefully).

A the code for the menu is available @

http://hometown.aol.com/gomerpyl3/myhomepage/index.html

Any help is gratefully recieved.

John
Jul 22 '05 #1
2 1980
gomerpyl3 writes:
I am trying to make a small system to record details for a small video
/ DVD shop - approx 200 members @ the mo

I wanted it to be able to do the following:

Check out a video / DVD
Return video / DVD
Add a new Video / DVD to stock
Remove a Video / DVD from stock
Display all Video / DVD in stock
Display member details


I assume this is a student exercise. The spec seems to be incomplete since
there is no way to get an inventory of members. A good first guess is that
you will want a video tape class and a member class. Take a stab at writing
the class definitions (but not the member functions) for those two. Keep
things simple; a couple of data items for each. You don't want this to
degenerate into a typing class. If you can handle two things, you can
probably handle n things. Note that neither class should be directly
cognizant of the other class. I would expect you to end up with either an
array, a vector or a list of objects. Two of them: one for tapes and one
for members. Which you end up with is pretty much a function of how the
course has been taught and the text book used and where you are in that
text.

Compile often. Just because you compile doesn't mean you have to also run a
program.


Jul 22 '05 #2
On 30 Apr 2004 09:07:39 -0700, go*******@aol.com (gomerpyl3) wrote:
I am trying to make a small system to record details for a small video
/ DVD shop - approx 200 members @ the mo

I wanted it to be able to do the following:

Check out a video / DVD
Return video / DVD
Add a new Video / DVD to stock
Remove a Video / DVD from stock
Display all Video / DVD in stock
Display member details
Very incomplete. Remember the acronym CRUD: Create, Read, Update,
Destroy. Apply this to your two data types: Video/DVD and Member.

I've made the Menu, but I am stumped as to how I can go about the rest
of the programmes & link them to the menu. Write a series of separate functions: check_out_video(/***/),
return_video(/***/) etc. Make these functions public member functions
of the appropriate class. Call them from your menu routine.


Storage of the details would be in a number of *.dat files
(hopefully). You will need some write() functions and some read() functions for
this. Again make them public member functions of the appropriate
class.

A the code for the menu is available @

http://hometown.aol.com/gomerpyl3/myhomepage/index.html
If your code is worth reading then it is worth cutting and pasting it
into your post here.
#include <iostream.h> This is deprecated, use <iostream> (no ".h")
void main(void) main *always* returns int. Your compiler should have rejected this.
(void) is unneccessary and often considered bad style.
Change to "int main()"

You should have spaces round operators for a better layout. An
ability to indent HTML, or a quick google for a code to HTML utility
would help.

rossum

Any help is gratefully recieved.

John


--

The Ultimate Truth is that there is no Ultimate Truth
Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: cm012b5105 | last post by:
Hello i want to put an interactive text programme in to a graphical box this is a small section of my text programme s = raw_input ("Hello whats your name? ") if s=='melvyn': print "your my...
0
by: melledge | last post by:
Full Programme for XTech 2005 Announced Premier European XML Industry Event Expands Focus to "XML, the Web and Beyond"; Co-hosted by the Mozilla Foundation,W3C, and OASIS, Presenters Include...
2
by: NDAKI MBOULET | last post by:
J'ai un problème pour écrire un programme. Voici mon sujet: Ecrire en c++ un programme qui reçoit en entrée une suite d'instruction encadrées par les mots clés BIBODLE et LISUK dans un langage...
5
by: katekukku | last post by:
HI, I need the source code for a programme in C. It should have the basic features of a paint programme like circle, line etc, etc,. I lost a programme which wa driven by keyboard, if somebody...
2
by: ali | last post by:
i need a programme that combine the classes: shortName , shortAddress, and shortPhone into a Record class: class Record shortName Name; shortAddress Address; shortPhone Phone; public: ...
0
by: pradeepm | last post by:
Hi If any one have programme coding for prgramme to above one pls send me.It's very urgent.Actually I am non computers student.I am learning JAVA my self only.I have taken challengely this...
18
by: arnuld | last post by:
i compiled the "hello world" programme from K&R2: #include<stdio.h> int main() { printf("hello world\n"); }
3
by: appy | last post by:
hi everyone, would u please help me! i want to write programme that contain 3 files, 2 with cpp suffix (like date.cpp & testDate.cpp) and 1 with h suffix(like date.h), i want to write function...
1
by: Diva | last post by:
Hiya can anyone help me, I am attempting to reverse a stack programme and have come up with void reverse(int stack, int *top) { int temp ; for (int i=0; i <*top;i++){ ...
6
by: =?ISO-8859-1?Q?FERHAT_A=C7ICI?= | last post by:
hi everyone...I want to run any programme or file with my programme.example any file or programme, like this "xxx.ncn".I want If users double click this xxx.ncn this file can run by my...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.