Project for University plz help

This is a discussion on Project for University plz help within the C Programming forums, part of the General Programming Boards category; The problem is A super market has 100000 clients. Each client has a codename (ex. ABC123456789 or DE5429GH139R). Each client ...

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    14

    Project for University plz help

    The problem is

    A super market has 100000 clients. Each client has a codename (ex. ABC123456789 or DE5429GH139R). Each client earns points for every visit to the Super Market depending on the money he spends. we want to know

    -How many times has the client visited the Super Market
    -How many points does he have.
    -The 10 best clients(according to the points)

    We also have 2 files as an input.

    1)The first file is the connection between points->money spent on each visit

    1;50;5
    51;100;10
    101;200;20
    201;300;40
    301;99999;50


    2)The second file is the codename of each client and the money he spent on each visit.

    ABC123456789;53
    DE5429GH139R;160
    ΑΒ43GF4321ER;420
    ……..
    ……..
    ……..

    My program must have this menu


    1. Insert Points File
    2. Insert Shopping File
    3. Best Clients
    4. Client's Data


    ANY IDEA HOW TO DO IT IN ORDER TO PASS THE LESSON..PLZZZ

  2. #2
    Registered User
    Join Date
    Nov 2006
    Posts
    176
    start by making a program that prints that menu -- test it
    then make it so the user can choose an option -- test it
    open file --test it
    open other file --test it
    store data in a structure --test it

    then maybe show us an attempt, and we can help as to were your going wrong if your having trouble.

    theres alot of other threads implimenting programs very similar to this

  3. #3
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,075
    Sent from my iPad®

  4. #4
    Registered User
    Join Date
    Dec 2006
    Posts
    14
    ok SlyMaelstrom I never asked from someone to do the job for me, I just asked from where should I begin ... thanks alot sl4nted for the advice.I just wanted to ask something . I 'll store the data in a struct and then do hashing (professor adviced to use hashing).Tnx a lot
    Last edited by kopros; 12-11-2006 at 12:09 PM.

  5. #5
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    >> ok SlyMaelstrom I never asked from someone to do the job for me, I just asked from where should I begin

    No you didn't. You asked

    >> ANY IDEA HOW TO DO IT IN ORDER TO PASS THE LESSON..PLZZZ

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

  6. #6
    Registered User
    Join Date
    Dec 2006
    Posts
    2

    Thumbs up

    Quote Originally Posted by Tonto
    >> ok SlyMaelstrom I never asked from someone to do the job for me, I just asked from where should I begin

    No you didn't. You asked

    >> ANY IDEA HOW TO DO IT IN ORDER TO PASS THE LESSON..PLZZZ
    Lol, That made me laugh

  7. #7
    Registered User verbity's Avatar
    Join Date
    Nov 2006
    Posts
    101
    Sit down
    Get paper and pencil
    Write an outline
    Or a flowchart
    Or whatever
    It makes it easier to find a starting point once your fingers hit the keys. And you should be able to at least kick out the structure of the program. And then if you need some help all these guys or gals will help. Take it from me....I've gotten on here and asked "How the heck do I start this". Then I got a ration of (#*$ and tonto called me a whiner. So give it your best shot first.

  8. #8
    Registered User
    Join Date
    Apr 2005
    Posts
    13
    This is easy but tedious. Draw a flow graph if you need help visualizing it. Declare a class with member variables to hold the values you want(Or go old-schoolerz with regular variables) and increment it, add, manipulate/whatever you want whenever the user does a performed action. Assuming that you're going to input into the program more then once with some possibly repeating action(s), then create a program loop to begin from the beginning of the main program(After the variables are initialized). That might help.

  9. #9
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484

    Wink

    Quote Originally Posted by swbluto
    Declare a class with member variables
    Because it is C-forum, it will be a struct
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 10:05 AM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 02:30 PM
  3. Game Independent Anti-cheat Project Needs Programmers
    By GIA Project Lea in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 09-15-2005, 08:41 PM
  4. Project - Help Plz
    By Shadow2552 in forum Windows Programming
    Replies: 11
    Last Post: 02-22-2004, 06:22 PM

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