Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Helping Understanding???

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb Helping Understanding???

    This is one of my sons Highschool project and he is asking me for help but dont have a very good back ground in programming. if i could get some help solving this program and some mild explaining on this so i could help him out that would be great. if anyone has extra question i would be glad to answer then to the best of my abilities. Thanks

    Project Description
    Your instructor has asked you to write a program that will generate a report of
    student absentances. The teacher does not know the number of students and
    the numbers of classes ahead of time, so your program should be general and
    ask for that information at run time.


    A possible plan to write a Java program that will solve the problem:

    1. Study the two sample execution runs of the program.
    Keep in mind that there are no hard coded numbers.
    The programmer will have to allow for any data values.

    2. Fill in the CSI Report based on your observations of the sample execution
    runs. This report will help the programmer get a feel for the data, logic,
    and error handling that will be needed to write the program.

    As you study the execution output, play the role of computer and decide upon the data variables you will need, write those data items down on paper and fill in the values (on the paper) as you proceed through the input data.

    3. Write an initial Java program stub as a first attempt for a complete
    program. If you call methods you need not write the logic for the
    method, just return a dummy value or print a dummy message. You need
    not handle error conditions at this point.

    Decide upon how you want to build your program in stages and proceed
    from stage to stage. Be sure and test your logic, as much as possible,
    at each stage in the programming process.

    Execution Run 1
    Enter the number of students: 3
    Enter the number of class meetings: 4
    Enter the student id numbers:
    Enter the id for student number 1
    25
    Enter the id for student number 2
    18
    Enter the id for student number 3
    39
    Now enter the student ids for those students attending each class
    For each class use an id of -1 after all data has been entered
    Enter students attending for class number 1
    Enter -1 to indicate no more data for class number 1
    18
    38
    38 not enrolled in the class
    39
    -1
    Enter students attending for class number 2
    Enter -1 to indicate no more data for class number 2
    39
    18
    25
    -1
    Enter students attending for class number 3
    Enter -1 to indicate no more data for class number 3
    18
    19
    19 not enrolled in the class
    -1
    Enter students attending for class number 4
    Enter -1 to indicate no more data for class number 4
    39
    25
    18
    -1
    Attendance Report
    Student ID Number Clases Absent
    25 2
    18 0
    39 1
    Press any key to continue . . .

    Execution Run 2
    Enter the number of students: 4
    Enter the number of class meetings: 2
    Enter the student id numbers:
    Enter the id for student number 1
    74
    Enter the id for student number 2
    35
    Enter the id for student number 3
    18
    Enter the id for student number 4
    52
    Now enter the student ids for those students attending each class
    For each class use an id of -1 after all data has been entered
    Enter students attending for class number 1
    Enter -1 to indicate no more data for class number 1
    9
    9 not enrolled in the class
    35
    52
    -1
    Enter students attending for class number 2
    Enter -1 to indicate no more data for class number 2
    63
    63 not enrolled in the class
    51
    51 not enrolled in the class
    18
    52
    -1
    Attendance Report
    Student ID Number Clases Absent
    74 2
    35 1
    18 1
    52 0
    Press any key to continue . . .



    A. Data Items:
    1. Single Variables
    a. Scalers int, boolean, char, etc.






    b. Java built in objects





    2. Data Structures
    a. Arrays







    b. User written classes





    B. Logic Control Structures
    1. Loops










    2. Nested Loops










    3. User written methods








    C. Error Handling


  2. #2
    Super Moderator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,234
    Thanks
    176
    Thanked 817 Times in 760 Posts
    Blog Entries
    5

    Default Re: Helping Understanding???

    Presuming you are truly your son's father, you wouldn't want to help your son cheat would you? That is exactly what is implied by posting a homework solution without showing any attempt. We will help, but I would recommend reading the link in my signature entitled "getting help" to learn how to make the best of this resource.

Similar Threads

  1. Replies: 7
    Last Post: August 1st, 2012, 12:37 PM
  2. gain of helping someone
    By luka316 in forum Member Introductions
    Replies: 1
    Last Post: February 6th, 2012, 06:53 AM
  3. hey everyone - fancy helping a newbie
    By dave11791 in forum Member Introductions
    Replies: 1
    Last Post: February 2nd, 2012, 01:48 PM
  4. [SOLVED] helping hand required
    By arvindbis in forum Web Frameworks
    Replies: 4
    Last Post: October 7th, 2011, 12:29 PM
  5. Help me Understanding Please...
    By Jabetha in forum What's Wrong With My Code?
    Replies: 4
    Last Post: August 17th, 2011, 01:55 PM