CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: JAVA assignment

  1. #1
    Join Date
    Oct 2014
    Location
    Accra- Ghana
    Posts
    2

    JAVA assignment

    please I need you guys to answer this java question for me by tomorrow
    because my java tutor will ask for it.


    A COLLEGE OFFERS A COURSE THAT PREPARES STUDENTS FOR THE SISCO CERTIFICATION EXAMS. LAST YEAR, THE COLLEGE PRESENTED A NUMBER OF STUDENTS FOR THE EXAMS. THE COLLEGE WANTS TO KNOW HOW WELL ITS STUDENTS DID ON THE EXAMS.
    WRITE A JAVA PROGRAM TO SUMMARIZE THE RESULT GIVING THE FOLLOWING TABLES
    JAMES=1
    PETER=1
    PAUL=2
    SAMPSON=1
    JOHN=2
    MIKE=1
    ANN=2
    HAWA=1
    ZAK=2
    BOAT=1

    NEXT TO EACH STUDENTS' NAME IS WRITTEN A 1 AND 2 IF THEY PASSED OR FAILED THE EXAMS RESPECTIVELY.
    1. OUTLINE THE ALGORITHMS FOR THE PROGRAM AND DRAW THE FLOW CHART
    2. DISPLAY A SUMMARY OF THE TEST RESULT INDICATING THE TOTAL NUMBER OF STUDENTS WHO PASSED AND THOSE WHO FAILED.
    3. IF FIVE OR MORE STUDENTS PASSED THE EXAMS, THE INSTRUCTOR GETS A BONUS. WHEN THE INSTRUCTOR GETS A BONUS, THE PROGRAM SHOULD CHECK IF THE STUDENT HAS PAID HIS/HER FULL FEES.
    IF THE STUDENT HAS PAID HIS/HER FULL FEES, THEY SHOULD BE ISSUED A CERTIFICATE, OTHERWISE, IF HIS/HER FEES IS NOT FULL, HIS/HER CERTIFICATE SHOULD BE WITHHELD.


    PLEASE FOLK, I NEED YOU GUYS TO HELP ME OUT WITH THIS WORK.
    EMAIL THE WORK TO THIS EMAIL ACCOUNT: dawson.tawia06@gmail.com

  2. #2
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: JAVA assignment

    please I need you guys to answer this java question for me by tomorrow
    because my java tutor will ask for it.
    Well you should have started it earlier!

    Please see http://forums.codeguru.com/showthrea...ork-assignment

    Nobody here is going to the assignment for you as that would be considered cheating. If you post your existing code to the Java forum http://forums.codeguru.com/forumdisp...va-Programming then we'll provide further advice and guidance.

    The outline algorithm for the program is simply the program design. Basically, how would you do this using a pen and paper, then consider input and output, error conditions etc.

    Draw the flow chart
    Really? Are flow charts still being taught? I thought they had been consigned to history when structured programming, top down design, agile development etc are used.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  3. #3
    Join Date
    Oct 2014
    Location
    Accra- Ghana
    Posts
    2

    Re: JAVA assignment

    THIS IS MY CODE PLEASE YOU GUYS SHOULD HELP ME OUT IF ITS WRONG

    import java.util.Scanner;
    public class WITHDRAWN
    {
    public static void main(String[]args){
    Scanner gladys=new Scanner(System.in);
    double passed;
    System.out.print("TOTAL NUMBER OF STUDENTS WHO WROTE THE SISCO TEST IS: \"10\"\n\n");
    System.out.print(" students passed... \n");
    System.out.print("4 students failed...\n");
    System.out.print("PLEASE ENTER A NUMBER! \n\n");
    passed=gladys.nextInt();
    if( passed>=5){
    System.out.print("instructor gets a bonus \n\n");
    }else
    System.out.print("INSTRUCTOR GETS NOTHING...\n\n ");
    System.out.print("PLEASE ENTER THE AMOUNT YOU HAVE PAID\n ");
    int fees;
    fees=gladys.nextInt();
    if(fees==100){
    System.out.print("YOU HAVE A CERTIFICATE\n");
    }else{
    System.out.print("certificate withheld\n");
    }
    }
    }

  4. #4
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: JAVA assignment

    As I mentioned in my post #2, please post your java code to the java forum. Also use code tags when posting code. Go advanced, select the code and click '#'.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured