Cant figure out how to do progrom help please

Discussion in 'C++' started by johny, Apr 13, 2005.

  1. johny

    johny Guest

    Program details as follows:

    Input to the program the exam number and computer arch and programming
    results for 10 people. Three arrays - ExamNo[10], Arch[10] and prog[10]
    are used to hold these items. The First name and surname of each
    student should also be entered, concatenated into one string and output
    to an array called wholename[10]

    We need to check weather the exam numbers are valid. An exam number
    should consist of 7 digits only Include a function in your solution
    that will pass in the exam number, determine if the exam number is
    valid or not and return an appropriate message. only valid exam numbers
    should be stored in the array ExamNo

    For each of the students, calulatE display the average mark for the
    class. For the Computer Arch results, find out how many students
    received below the class average. Find the name of the students with
    the highest result in each subject. These students' name are to be
    displayed and told that they will receive a special prize for their
    outstanding results.

    For programming results, calulate and display standard deviation. I
    think this is the following steps in order to get it
    1. Calculate the average of the programming results

    2. Calculate the variance(d) by subtracting each result from the
    average

    3. Square each of these results to get variance squared.

    4. Sum all the variances squared

    5. Divide by the number of numbers

    6. Get the Square root of the result which is the standard Deviation.

    Display the exam number, whole name and both results for all students.

    Let me know what ya think.
    johny, Apr 13, 2005
    #1
    1. Advertising

  2. johny

    Reddsci2001 Guest

    What is that you are having trouble with?

    On Wed, 13 Apr 2005 14:50:53 -0700, johny wrote:

    > Program details as follows:
    >
    > Input to the program the exam number and computer arch and programming
    > results for 10 people. Three arrays - ExamNo[10], Arch[10] and prog[10]
    > are used to hold these items. The First name and surname of each
    > student should also be entered, concatenated into one string and output
    > to an array called wholename[10]
    >
    > We need to check weather the exam numbers are valid. An exam number
    > should consist of 7 digits only Include a function in your solution
    > that will pass in the exam number, determine if the exam number is
    > valid or not and return an appropriate message. only valid exam numbers
    > should be stored in the array ExamNo
    >
    > For each of the students, calulatE display the average mark for the
    > class. For the Computer Arch results, find out how many students
    > received below the class average. Find the name of the students with
    > the highest result in each subject. These students' name are to be
    > displayed and told that they will receive a special prize for their
    > outstanding results.
    >
    > For programming results, calulate and display standard deviation. I
    > think this is the following steps in order to get it
    > 1. Calculate the average of the programming results
    >
    > 2. Calculate the variance(d) by subtracting each result from the
    > average
    >
    > 3. Square each of these results to get variance squared.
    >
    > 4. Sum all the variances squared
    >
    > 5. Divide by the number of numbers
    >
    > 6. Get the Square root of the result which is the standard Deviation.
    >
    > Display the exam number, whole name and both results for all students.
    >
    > Let me know what ya think.
    Reddsci2001, Apr 14, 2005
    #2
    1. Advertising

  3. johny

    codigo Guest

    <snip>

    > Let me know what ya think.
    >


    I think you can do it !
    codigo, Apr 14, 2005
    #3
  4. "johny" <> wrote in message
    news:...
    >
    > Let me know what ya think.


    Doesn't sound too hard.
    James Aguilar, Apr 14, 2005
    #4
  5. johny

    Jason Guest

    johny wrote:
    > Program details as follows:
    >


    <snip!>

    > Let me know what ya think.


    I think this is an excellent beginner's assignment. I kinda reminds me
    of when I was first learning C++...

    Once you have it written, if you are stuck then feel free to post your
    code and ask for help.

    -Jason
    Jason, Apr 14, 2005
    #5
  6. johny wrote:
    >
    >
    > Let me know what ya think.


    Start with the parts you *can* do

    Divide the assignment into managable parts.

    Eg. Can you write a function that checks a *single*
    exam number?
    If you can, fine. Start with that, write it, test it.
    If no: Why not? Where is your problem?

    If you have that function, you could proceed with
    creating the arrays and let the user enter his data
    (using the above function to check the input). Continue
    with just outputing what the user has entered (to see if the
    input functionality works correct).

    Got that to work? Fine.

    Look at the assignment. What can you do next, now that you have
    implememted the above. Average mark. All of the data is available
    and calculating the average isn't that hard. So you could proceed
    with implementing (and testing) that.

    And so on, and so on.
    The important point is: Divide the work into pieces and work on
    each piece individually. The assignment might look big and complicated,
    but it isn't when done this way.

    And yes: even professional programmers work this way:
    Start simple. Implement parts of the code and test them (that
    is especially important: you need to make sure that those parts
    work as expected *before* you use them as building blocks for
    more complicated parts).

    --
    Karl Heinz Buchegger
    Karl Heinz Buchegger, Apr 14, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. AFN
    Replies:
    9
    Views:
    409
  2. Justin
    Replies:
    2
    Views:
    251
    Justin
    Oct 9, 2006
  3. Simon Mansfield

    Cant quite figure out whats wrong!? Help??

    Simon Mansfield, Dec 5, 2004, in forum: C Programming
    Replies:
    6
    Views:
    385
    Lawrence Kirby
    Dec 6, 2004
  4. Replies:
    2
    Views:
    3,273
    Ron Natalie
    Aug 11, 2006
  5. Nagaraj
    Replies:
    1
    Views:
    835
    Lionel B
    Mar 1, 2007
Loading...

Share This Page