Results 1 to 4 of 4

Thread: Java NOOB Help.

  1. #1
    AdamHelzburg is offline Member
    Join Date
    Jul 2016
    Posts
    1
    Rep Power
    0

    Default Java NOOB Help.

    I need some help here guys. I'm brand new to Java and would like to learn it. Can someone show me how to complete the program below?

    Java NOOB Help.-123.jpg



    Requirements:

    A. Include your personal information in the last item of the table above.

    B. Create a program that uses the information in the table above to create an ArrayList of Student objects. For the Student object class, do the following.
    1. Include the following instance variables that describe each student:

    • student ID

    • first name

    • last name

    • e-mail address

    • age

    • array of grades

    2. Include the following methods in the Student class:

    a. an accessor (i.e., getter) for each instance variable from part B1

    b. a mutator (i.e., setter) for each instance variable from part B1


    Note: All access and change to the instance variables of the Student class should be through accessor and mutator methods.


    c. constructor using all of the input parameters

    d. print() to print specific student data (e.g., student ID, first name, last name) using accessors (i.e., getters)


    Note: Printing out the grades is optional, not required.


    3. Create a student Roster class with the following methods that contain all ArrayList method calls:

    a. public static void remove(String studentID) that removes students from the roster by student ID


    Note: If the student ID doesn’t exist, the method should print an error message indicating that it is not found.


    b. public static void print_all() that prints a complete tab-separated list of student data using accessor methods


    Note: Tabs can be formatted as such: 1 [tab] First Name: John [tab] Last Name: Smith [tab] Age: 20 [tab] Grades: {88, 79, 59}. The print_all() method should loop through all the students in the student array list and call the print() method for each student.


    c. public static void print_average_grade(String studentID) that correctly prints a student’s average grade by student ID

    d. public static void print_invalid_emails() that verifies student e-mail addresses and displays all invalid e-mail addresses to the user


    Note: A valid e-mail should include an at sign (“@”) and period (“.”) and doesn’t include a space.


    C. Demonstrate the program’s required functionality by running the following scenario:
    print_all();
    print_invalid_emails();
    //loop through the ArrayList and for each element:
    print_average_grade(current_loop_student);
    remove("3");
    remove("3");
    //expected: this should print a message saying such a student with this ID was not found.

    Thanks!

    Adam

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Java NOOB Help.

    What do you know about Java? Its nearly impossible to help you do anything if you don't make a start yourself and are at least minimally familiar with the language.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    14

    Default Re: Java NOOB Help.

    First, if this is for a class, no one would be given this program to write if they are brand new to Java. It requires a
    knowledge of Strings, ArrayLists, classes, methods, and more. Those would take at least several weeks in a class to cover
    the topics and employ them in other programs.

    Second, if this is really your first program, you are starting too big. You still have to learn the stuff mentioned above.

    Here is your first test. Focus on writing a method that validates email addresses when passed a string. Once done,
    you can incorporate it into the main program and not have to worry about that part. In other words, break up your
    assignment into manageable pieces.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    27

    Default Re: Java NOOB Help.

    Assuming you are not a complete noob, otherwise (as jim says) you wouldn't be doing this problem, you should simply work from the top down of that list of requirements.

    It's ordered so that you can step through each part and have valid code that compiles after each step (and remember to compile often).
    The first step (A) doesn't even involve code.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. HELP! Java noob!
    By dchaan in forum New To Java
    Replies: 4
    Last Post: 07-06-2015, 09:48 AM
  2. Noob to Java
    By radiodave in forum Introductions
    Replies: 3
    Last Post: 05-10-2015, 03:24 PM
  3. Help with GUI - Java NOOB :(
    By bdelarosa7 in forum New To Java
    Replies: 3
    Last Post: 11-22-2011, 09:54 PM
  4. Help im a noob.. a super noob on java..
    By critdevil in forum New To Java
    Replies: 12
    Last Post: 03-07-2009, 03:17 AM
  5. Ah! Help a Java Noob
    By Snejana in forum New To Java
    Replies: 4
    Last Post: 01-24-2008, 03:52 AM

Posting Permissions

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