C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 05-30-2002, 11:46 AM   #1
Unregistered
Guest
 
Posts: n/a
Have You Got A program To Match Question.

Not asking for anybody to write a program ,was hoping somebody would be so kind and give me a program that matches the question please.

A small shopkeeper uses a simple computer system to keep an up to date inventory of all products stocked. Every week the shopkeeper updates the stock file with a series of stock amendments, stored on another file. The format of both TEXT FILES is shown below, with each record stored in ascending order of product code, and each field being separated by a comma. Both files tenninate with a special "sentinel" product code of 9999.

Stock File.

Product Code 4 digits
Quantity 4 digits (in the range 1000 to 9999)
Buying Price 4 digits
Sale Price 4 digits

Stock Amendments File.

Product Code 4 digits
Amendment Type 1 character 'I' for an issue from stock.
'R' for a receipt into stock.
'B' for an amendment to the buying price.
'S' for an amendment to the sale price.
'D' for a deletion of the stock item.

Value 4 digits

NOTE
The data item "Value" will be zero in the case of a stock item deletion.

Find a program that will update the existing stock file, creating a new stock file, in the
same order as the original. It is possible that a stock item will have one, more than one,
or no transactions during a week. After the update of a master record, any stock item
that is outside the given range should also have the record written to a "query file".
You can assume that there are no transactions in the stock amendments file that do not
have matching product codes in the stock file.
  Reply With Quote
Old 05-30-2002, 06:00 PM   #2
Unregistered
Guest
 
Posts: n/a
Both If You got The Time No Probs.
  Reply With Quote
Old 05-30-2002, 08:09 PM   #3
Registered User
 
Join Date: Sep 2001
Location: Australia
Posts: 212
R U KIDDING? We are not going to give you code nor write code for you. Do it YOURSELF! You won't learn anything if we do it for YOU.
kwigibo is offline   Reply With Quote
Old 05-30-2002, 08:24 PM   #4
Unregistered
 
Leeman_s's Avatar
 
Join Date: Oct 2001
Posts: 753
programming classes REALLY suck. learning on your own is MUCH better in my opinion. hehe, i know more than the programming teacher at my high school....

p.s. im not so sure anyone will just happen to have a program like what you want...
Leeman_s is offline   Reply With Quote
Old 05-30-2002, 08:48 PM   #5
Registered User
 
loopy's Avatar
 
Join Date: Mar 2002
Posts: 172
Leeman_s

Quote:
Originally posted by Leeman_s...
programming classes REALLY suck. learning on your own is MUCH better in my opinion. hehe, i know more than the programming teacher at my high school....
Do you really think so? Because i've poured though at least 3 on-line tutorial's in c++ then c, after all that and writing my own rpg(don't ask) i feel a little directionless. I been feeling latlely that i have a handle on the language almost, but just don't know where to go from here, which brought me to think about school.
I have a million program's i would like to write, but i feel out of resource's.
__________________
WorkStation(new, a month ago):

Sony Vaio i686 Desktop
2.60 GIGhz Intel Pentium 4(HT)
512Mb DDR RAM
800MHz Front Side Bus!
120 GIG IDE HardDrive
Matrox G400 Dual-Head
Linux kernel 2.6.3
Modified Slackware 9.1
GCC/GDB

Multi-mon
Simultaneous Multiple Processes
loopy is offline   Reply With Quote
Old 05-31-2002, 05:20 PM   #6
Unregistered
Guest
 
Posts: n/a
I Am Concidering doing C programming and found this Question at a sister site,,ok you gona be stuck up about it fine,,,so I'll stick to what I do best help people...
  Reply With Quote
Old 05-31-2002, 06:51 PM   #7
Registered User
 
Join Date: Sep 2001
Location: Australia
Posts: 212
We do LIKE to help people, I get A LOT OF SATISFACTION knowing I've HELPED someone. But when someone is LAZY and WON'T HELP THEMSELVES. I don't care what think of me, because they have no self respect.

kwigibo
kwigibo is offline   Reply With Quote
Old 05-31-2002, 09:32 PM   #8
Registered User
 
Join Date: May 2002
Posts: 50
I think it's pointless (or at least mostly so) to take programming classes if you don't already know programming. Teachers for programming have one of two problems:

1. They assume you are smarter than you are, or that you already know programming, but either way they zoom through the material without any care as to whether or not their student actually catches what he's saying.

2. They're bleeping idiots who can't teach their way out of a cardboard box, and you end up wasting hours you could have spent learning on your own.

Classes have the advantage that they add structure to what you might call "directionless." However, I don't think they're good for beginning to learn programming.. they don't teach you how to learn to program, they teach you how to finish homework assignments. Taking the class AFTER you know how to program might just give you some ideas for new programs, or ideas how to improve ones you have, but they don't have that advantage if you're taking it to learn to program.

I say all this from personal experience....
bluecoder is offline   Reply With Quote
Old 06-01-2002, 08:25 AM   #9
Registered User
 
The Dog's Avatar
 
Join Date: May 2002
Location: Cape Town
Posts: 777
Quote:
I think it's pointless (or at least mostly so) to take programming classes if you don't already know programming. Teachers for programming have one of two problems:
You must really have had some crappy teachers.

Not all lecturers are like that.
I was tought as if I was 12-year old who knew absolutely nothing.

I must say that my programming lecturer was one of the best lecturers i've had for any subject.
The Dog is offline   Reply With Quote
Old 06-01-2002, 11:23 AM   #10
Registered User
 
red_baron's Avatar
 
Join Date: May 2002
Posts: 274
hehe my high school teacher taught me a lot, (in the first 2 months) but after i started teaching myself take a look at the link in my signature, the old programs were assingments from my teacher, the new one i used the concepts my teacher taught me as well as what i learned searching through this board.
All i got to say is that some teachers are helpful, like mine who taught me the very basics, like what variables, arrays, loops, and functions are, but after its better to start doing a little studying of your own.
__________________
¿Red Baron?

"Imagination is more important than knowledge"
-Albert Einstein (1879-1955)

Check out my games!

[code] /* dont forget code tags! */ [/code]
red_baron is offline   Reply With Quote
Old 06-01-2002, 03:50 PM   #11
Registered User
 
Join Date: May 2002
Posts: 50
I didn't take computer programming classes.

I have taken computer science classes, which are markedly different. The character of a computer science class teaches you abstractions about programming, abstract data types, to think of programming ideas as "objects" to be manipulated, etc., the deeper "what if" questions that are most important to things like data bases, but divorced of the "how to" that programming classes focus on.

In other words, it doesn't matter what language you choose to enforce serialization of procedures, but it DOES matter the METHOD by which you choose to do so. True the syntax for the method will be different depending on the language, but the theory will remain the same.

Computer science classes (I go to UC Berkeley) don't focus on the language and they don't teach you how to use it. That's your problem to deal with.

This is why I say it's better to know programming before you take the classes - but I speak from the point of view of someone taking classes at a university that teaches computer science, not computer programming. I suppose the experience in a programming class would be different. I have heard many complains about programming classes on these boards too thought, so mine is not an isolated complaint.
bluecoder is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bugs in Program Question racerday182 C++ Programming 14 12-05-2008 10:30 AM
Non-lvalue in Program Question thekautz C++ Programming 2 11-07-2008 03:52 PM
Question regarding a this C program cnb C Programming 10 10-11-2008 04:43 AM
Data Question about Reading Files: Encapsulated Inventory Program in C++ goron350 C++ Programming 26 06-15-2005 02:38 PM
N00b Question. Can't get this program to work with me !!! Halo C Programming 8 03-26-2002 07:55 AM


All times are GMT -6. The time now is 07:24 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22