Help Expanding a Beginner C++ Project?

I don't mean to be a leecher right on the day I joined CE, but I'm a bit pressed on time for the completion of this task at the moment, with a progress of 0%

A little background information on me first; I'm a first-year Electrical Engineering student. I've just began learning how to use C++ this semester; my knowledge of C++ is very basic because we're really "learning from scratch" ๐Ÿ˜ If you still want to get a better idea of how "basic" my knowledge of C++ is, well... let's just say that I've only been given an introductory course on object-oriented programming.

Anyhow, I need to create a program that utilizes FILE operations (things like fopen(), fclose(), fprintf(), etc.), and, if possible, uses other things that have been taught in the course (such as the usage of selection/bubble sorting, arrays and/or structures, etc.).

My team member gave me the idea to make a program that would calculate someone's BMI (Body Mass Index) and their body type according to their height, weight, age, and gender. My problem is that the idea seems kind of dull, since I asked around and my friends did more interesting projects such as games (Blackjack, Hangman, etc.)... and I think it's too late for me to switch from the BMI idea, since my lecturer already collected each team's project idea and I'm not sure about his leniency...

Back to the BMI idea. I decided to expand on this by perhaps storing these inputs in a file, then presenting them in the form of a table, sorted by the body types (from thin -> obese, or the other way around... not sure yet).

I think I can do those things previously mentioned, but I feel that it's really standard and... dull. Any idea on what I should add to make it more interesting?

There's one thing that I want to do to make it more interesting; maybe right after someone inputs their data, the text "___% of our respondents are more slim/obese than you" and an offer to access the table containing all of the respondent's data... but I'm not sure how to do the percent thing.

Help, please...

Replies

  • Ashraf HZ
    Ashraf HZ
    Nice, a detailed query.. haven't seen that in a while ๐Ÿ˜›

    Good news is, there are a lot of expert programmers here. The bad? Many are not really active in the forum.

    What I suggest you do, if you haven't already, is sketch out what your menu and output would look like. I'm not sure if this is the correct approach when solving programming issues, but worked for me at least (I guess the proper way is to write out pseudo code or flowchart for every function you plan on using.. but thats a little boring). While doing that, you'll know what functions to use. Arrays would certainly be your best friend in this case.

    For the % thing, you can use a looped conditional function and use counters to count numbers of entries that are more/less than the user input. Though, if you manage to sort the entries automatically, you might use an easier method.

    What is your time frame for this project? I'm sure other CEans have some brilliant ideas.
  • Amnd
    Amnd
    @ ash: You get more if you give more, right? ๐Ÿ˜

    Well, we have to provide the flowchart of the program in the report we have to submit, anyhow, so I have made some sort of flowchart.

    Bad news; my flash disk went weird on me and it can't be detected by all of the computer I connected it into. So, from a progress of around 60%, I'm not back to 0%, sort of.

    Anyhow, in my old code, I tried using arrays in a structure that would "read" the input data (I made a function to store the data, and one to read the data. The second function reads the file and is supposed to store them into the arrays so then I can sort the data according to the BMI before displaying them but...

    well, let's just say I have the variable 'age' previously inputted and now is about to be retrieved from a file I placed it into, and I want it to go into my array, x.age. Naturally, I retrieved 'age' using fscanf() [I don't really get fread() and fwrite(), unfortunately), and placed it into the equation x.age=age;

    The problem is that it keeps telling me that x.age needs to be of l-value... I looked up l-value, and I don't get this part...

    A modifiable l-value cannot have an array type, an incomplete type, or a type with the const attribute. For structures and unions to be modifiable l-values, they must not have any members with the const attribute.
    ash
    For the % thing, you can use a looped conditional function and use counters to count numbers of entries that are more/less than the user input. Though, if you manage to sort the entries automatically, you might use an easier method.
    Shall try... Though, last night I had no luck trying to display a table of the respondent's inputs (I haven't even gotten to the sorting part yet, shucks...) I have a vague idea on what I should do ๐Ÿ˜

    The project's due on Saturday (yea, this Saturday), so if anyone has any additional ideas, the time is now... ๐Ÿ˜›
  • Ashraf HZ
    Ashraf HZ
    Ah.. hows progress? Sorry, I didn't check this thread earlier. I hope you managed to finish in time ๐Ÿ˜€

You are reading an archived discussion.

Related Posts

hello friends i am rohit doing engineering in electrical & electronics branch.I need your help .I have to make a mini project within a week so can you please suggest...
A desperate woman writes to the Technical support Guy, Dear Tech Support, Last year I upgraded from Boyfriend 5.0 to Husband 1.0 and I noticed a distinct slowdown in the...
[FONT="]Just received this -[/FONT] [FONT="] [/FONT] [FONT="]Right Media will discontinue the DMX platform on January 31, 2010, so that we may focus on becoming a premium and differentiated exchange marketplace....
โ€“ High gas barrier back sheet for thinner photovoltaic modules โ€“ 1 December, 2009 โ€“ Mitsubishi Plastics, Inc. (MPI) today launches its high gas barrier Photovoltaic (PV) back sheet, BACK-BARRIER,...
Suppose 8 monkeys take 8 minutes to eat 8 bananas.a. How many minutes would it take 3 monkeys to eat 3 bananas?