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 3 of 3

Thread: URgent!!!help!!1

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

    Default URgent!!!help!!1

    Anyone can help me solve this????
    Question 1:
    Write a class named TestScores. The class constructor should accept an array of test scores as its argument. The class should have a method that returns the average, highest and lowest score of the test scores. If any test score in the array is negative or greater than 100, the class should throw an IllegalArgumentException. Demonstrate the class in a JAVA program.
    (10 marks)

    Question 2:
    Write an exception class named InvalidTestScoreException. Modify the TestScores class you wrote in Question 1 so that it throws an InvalidTestScore Exception if any of the test scores in the array are invalid.
    (10 marks)

    Question 3:
    Modify the TestScores class that you created in Question 1 to be serializable. Write a JAVA program that creates an array of at least five TestScore objects and serializes them. Write another JAVA program that deserializes the objects from the file.
    (10 marks)

    Question 4:
    Modify your coding in Question 3 so that all the valid scores are written into an ArrayList. Write a Java Program to display all elements you have been added into your ArrayList.
    (10 marks)


    thx alot!!!

  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: URgent!!!help!!1

    No, we are not a homework service. Make an attempt, and if you stumble along the way post a specific question and we can try and push you in the correct direction. And lastly, your urgency is relative - every question is urgent to those who posted them. Stating yours can be considered quite selfish.
    Suggested reading: http://www.javaprogrammingforums.com...e-posting.html

  3. #3
    Member
    Join Date
    Jul 2012
    Posts
    83
    My Mood
    Cynical
    Thanks
    3
    Thanked 9 Times in 9 Posts

    Default Re: URgent!!!help!!1

    Done! I've solved the problems. Now what?

Similar Threads

  1. urgent help!
    By elcompar in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 24th, 2012, 07:10 AM
  2. Need urgent help regarding java word wrap function.. URGENT
    By coldice in forum What's Wrong With My Code?
    Replies: 3
    Last Post: August 16th, 2011, 05:43 AM
  3. Urgent!!!!!!!!!!!!!!!!
    By dinesh03188 in forum JDBC & Databases
    Replies: 3
    Last Post: May 14th, 2010, 01:38 AM
  4. Urgent Help Please :)
    By Jamie94 in forum Algorithms & Recursion
    Replies: 0
    Last Post: May 12th, 2010, 06:34 AM
  5. Replies: 1
    Last Post: May 4th, 2009, 06:30 AM