The Artima Developer Community
Sponsored Link

Java Answers Forum
assignment help

3 replies on 1 page. Most recent reply: Feb 19, 2003 3:16 AM by robert eldred

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
robert eldred

Posts: 3
Nickname: rob2684
Registered: Feb, 2003

assignment help Posted: Feb 18, 2003 8:40 AM
Reply to this message Reply
Advertisement
You are asked to write a class called ArrayReader which provides static methods to read and write arrays to and from the disk. the code should be robust and throw an ArrayReaderException if any problems occur. The file format is 'comma spearated text'.

1) Define the ArrayReaderException class with a constructor to allow a warning message to be displayed. The ArrayReaderException should be a checked exception.

2) Define the empty ArrayReader class and add a method with the format below, which reads the contents of the file (example.mat) from the disk and returns an integer array.

public static iny[][] parseFile(String fileName)

3) Add a method with the format below which writes the array to the disk in the correct format.

public static void writeFile(String fileName, int[][] array)

4) Add a static 'main' method to demosntrate the code by reading 'example.mat' and saving it under a new name.


Laurence

Posts: 5
Nickname: lau03
Registered: Feb, 2003

Re: assignment help Posted: Feb 18, 2003 10:11 AM
Reply to this message Reply
I don't mean to be rude, but are you expecting somebody to do all the work for you here?

robert eldred

Posts: 3
Nickname: rob2684
Registered: Feb, 2003

Re: assignment help Posted: Feb 18, 2003 3:41 PM
Reply to this message Reply
Thats about the gist of it yeah, isn't that what you people do?

robert eldred

Posts: 3
Nickname: rob2684
Registered: Feb, 2003

Re: assignment help Posted: Feb 19, 2003 3:16 AM
Reply to this message Reply
No, only joking, I actually only need help on the second part of the question as I have now completed the other three parts

Flat View: This topic has 3 replies on 1 page
Topic: Java compareTo method Previous Topic   Next Topic Topic: what isadapter class

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use