User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 402,911 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,109 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 289 | Replies: 5 | Solved
Reply
Join Date: Jul 2008
Posts: 3
Reputation: licruzny is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
licruzny licruzny is offline Offline
Newbie Poster

Linked List program HELP

  #1  
Jul 8th, 2008
Please help with the following linked list program. Any help is good =]


Use a linked list to do this program

a store recieves shipmesnts of chairs at various cost. the store policy is to charge a 35% markup, and to sell chairs which were received earlier before chairs that were recieved later (FIFO policy).

write a program in C++ using linked list that reads 3 types of input data and does the following:

1-a sales record which contains an "S" in colum 1 and a quantity which represents the number of chairs sold

2-a receipt record which contains an "R" in column 1 and a quantity and a price which represents the receipt of a quantity of chairs at the stated cost per chair.

3-a promotion card which contains a "P" in column 1 and a number such as 15 which would represent a 15% discount to the next 2 buying customers

the program should print a message after each receipt record is read in with the price of the chairs received and print a message after each promotion card is read in with the amount of discount the next two customers will be receiving.

after a sales record is read in print a message stating the number sold and the price of each chair and total price of the order.

if there are an insufficient number of widgets in stock to fill an order sell as many as are available then print

"remainder of xxx chairs not available"

do not forget promotional discount

at the ens of the data before exiting the program print out under a seperate heading the chairs still left in stock and their original purchase price
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2008
Location: USA East Cost
Posts: 386
Reputation: CoolGamer48 is on a distinguished road 
Rep Power: 1
Solved Threads: 37
CoolGamer48's Avatar
CoolGamer48 CoolGamer48 is offline Offline
Posting Whiz

Re: Linked List program HELP

  #2  
Jul 8th, 2008
No one's going to do this for you. If you have a specific question - ask that. To start off, do you know what a linked list is?
I'm a student. If my statements seem too absolute, feel free to coat them with "In my opinion..." or "I believe...".
Reply With Quote  
Join Date: Sep 2004
Posts: 6,070
Reputation: Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of 
Rep Power: 26
Solved Threads: 419
Super Moderator
Narue's Avatar
Narue Narue is offline Offline
Expert Meanie

Re: Linked List program HELP

  #3  
Jul 8th, 2008
>Any help is good =]
I'm curious, can you define what you mean by "help"? Because it looks a lot like you want us to do your homework for you.

Anyway, this may help you.
I'm a programmer. My attitude starts with arrogance, holds steady at condescension, and ends with hostility. Get used to it.
Reply With Quote  
Join Date: Jul 2008
Posts: 3
Reputation: licruzny is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
licruzny licruzny is offline Offline
Newbie Poster

Re: Linked List program HELP

  #4  
Jul 8th, 2008
Ok well i aint mean do it i guess ma question would be how would i read a file with this info into a linked list
Reply With Quote  
Join Date: Jan 2008
Location: USA East Cost
Posts: 386
Reputation: CoolGamer48 is on a distinguished road 
Rep Power: 1
Solved Threads: 37
CoolGamer48's Avatar
CoolGamer48 CoolGamer48 is offline Offline
Posting Whiz

Re: Linked List program HELP

  #5  
Jul 8th, 2008
Originally Posted by licruzny View Post
Ok well i aint mean do it i guess ma question would be how would i read a file with this info into a linked list

So you want to know about file streames and linked lists. For reading files: ifstream, and for linked lists, see the link two posts above.
I'm a student. If my statements seem too absolute, feel free to coat them with "In my opinion..." or "I believe...".
Reply With Quote  
Join Date: Jul 2008
Posts: 3
Reputation: licruzny is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
licruzny licruzny is offline Offline
Newbie Poster

Re: Linked List program HELP

  #6  
Jul 8th, 2008
THANX =]
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C++ Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 3:55 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC