Urgent help with assignment due tomorow

I have an assignment due tomorow and i have absoulutly no time not to mention i am completely stumped. I was hoping that someone out there would either complete the code for all of my Duke Stars or at least give me an insight on how this should be done. PLEASE, PLEASE help me!! i am in great need. I will show the assignment info then the code.

I also have an example of the GUI in .exe form i was trying to deconstructed it to look at the source code, i failed. I need more help with the coding than i do with setting up the GUI

Array Based GUI Assignment

Telephone call data has been collected from a company's telephone switch. You have been asked to analyze it and produce various statistics.

Input File

The input file is a sequential file. It is in no specific order. The file contains an extension number, type of call, and the length of call in seconds. A record is produced each time a call is made from that extension. You should create your own test file.

FieldTypeDescription

ExtensionIntegerExtension number. This is a 4 digit number. Valid Extensions are 2000 to 2020.

TypeIntegerValue of 1 means internal, any other value is an external call.

TimeLongLength of call in seconds

Example:

2000,1,60 : -->>>> Extension 2000 had an internal call that lasted 60 seconds

2000,1,356: -->>>> Extension 2000 had an internal call that lasted 356 seconds

2019,2,65: >>>> Extension 2019 had an external call that lasted 65 seconds

2001,1,355: -->>>> Extension 2001 had an internal call that lasted 355 seconds

Process

1.Use 2 arrays to accumulate the time of calls for each extension, both internal and external.

2.The reports and queries are to be produced from the arrays.

Hints:

Create 2 arrays: one for internal calls and one for external calls.

Load the arrays in Form Load: do not do any calculations here.

The report and queries can totally be produced from the arrays.

Output: Report

Telephone Useage Report

Extension Internal External

200045003500

20011935022981

20022333900

20033144122

Totals9999999999

Output: Queries

On the form add add query capability.

1.Average Total Utilization: Internal Calls: 9999 (total length of all internal calls / number extensions)

2.Average Total Utilization: External Calls: 9999

3.Extension with the highest internal call utilization: Ext xxxx; 9999 seconds.

4.Extension with the highest total utilization.

Form Design

The design of the form is up to you. However, use the following guidelines:

use menus (preferred) or command buttons

use a common dialog box to ask for the file name

use a list box or text box to display the output

the caption on the form should include your name

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

import java.util.*;

import java.io.*;

import java.util.StringTokenizer;

class PhoneProjectextends JFrame

{

privatestaticfinalint WIDTH = 260;

privatestaticfinalint HEIGHT = 200;

privatestaticfinalint X_ORIGIN = 402;

privatestaticfinalint Y_ORIGIN = 299;

ArrayList internalCalls =new ArrayList();

ArrayList externalCalls =new ArrayList();

String inRecord;

int numExtension;

int numCallType;

int numSeconds;

publicvoid loadArray()throws IOException

{

FileReader fr =new FileReader("phone.txt");//reading phone.txt

BufferedReader br =new BufferedReader(fr);

while ((inRecord = br.readLine()) !=null)

{

StringTokenizer tokenizer =new StringTokenizer(inRecord);

String extension = tokenizer.nextToken();

String callType = tokenizer.nextToken();

String seconds = tokenizer.nextToken();

numCallType = Integer.parseInt(callType);

if (numCallType == 0)

{

System.out.println("zero");

}

if (numCallType == 1)

{

System.out.println("ones");

}

}

}

public PhoneProject()

{

Container contentPane;

setBounds(X_ORIGIN, Y_ORIGIN, WIDTH, HEIGHT);

setTitle("Phone Analyzer");

setResizable(true);

}

}

This is my .txt file first numbers=extension, 2nd is 0=internal 1=external, 3rd is time in seconds

2000 0 300

2000 0 538

2000 1 305

2000 1 729

2005 0 205

2005 0 305

2005 1 592

2005 1 594

2010 0 364

2010 0 464

2010 1 904

2010 1 100

2020 0 234

2020 0 839

2020 1 999

2020 1 210

thanx so much for your help

Dan

[6590 byte] By [sannitiga] at [2007-11-27 10:59:55]
# 1

You already said it: you failed.

SurfManNLa at 2007-7-29 12:26:21 > top of Java-index,Java Essentials,Java Programming...
# 2

* Your subject line contains no useful information.

* You claimed it was urgent, which implies you expect people to consider your problem more important that others'.

* You didn't ask a specific question.

* You asked people to do your homework for you.

For these reasons, I will not even consider helping you, and I hope others will take the same stance.

Post smarter next time.

jverda at 2007-7-29 12:26:21 > top of Java-index,Java Essentials,Java Programming...
# 3

Ironically, my company does stuff like this for real.

jverda at 2007-7-29 12:26:21 > top of Java-index,Java Essentials,Java Programming...
# 4

Even more ironically, he registered 12/5/06, so he's been on Teh Jav for more than a year now... He should know how arrays work by now...

SurfManNLa at 2007-7-29 12:26:21 > top of Java-index,Java Essentials,Java Programming...
# 5

I'll do your homework for you if you give all the duke stars to me in advance :-\.

We all know how incredibly valuable they are. I mean, just look at how much you had to pay to get the ones you have when you signed up on this site. They're priceless, just like you are.

warnerjaa at 2007-7-29 12:26:21 > top of Java-index,Java Essentials,Java Programming...
# 6

hey this is my first time posting. i didn't know if people were going to answer or not. I'm just really screwed right now and i was reaching out. If no-one wants to do it for me thats fine at least give an insight on how i should attack this or if im on the right track and were i should be heading thats all i ask.

sorry if i offended anyone by the way i did

Dan

sannitiga at 2007-7-29 12:26:21 > top of Java-index,Java Essentials,Java Programming...
# 7

> hey this is my first time posting.

Oh, so because you've never posted here before, there's no reason to expect you to know how to ask a meaningful question, or to know that getting others to do your homework is cheating, which is wrong. I see.

> If no-one

> wants to do it for me thats fine at least give an

> insight on how i should attack this or if im on the

> right track and were i should be heading thats all i

> ask.

The fact that you even asked someone to help you cheat makes me (and probably others) not want to help.

If you're sincere about doing your own work (with some help in the form of nudges in the right direction), then attack one piece at a time and post specific questions about specific problems you have as you go. "I don't know how to do it," is not conducive to getting help.

jverda at 2007-7-29 12:26:21 > top of Java-index,Java Essentials,Java Programming...
# 8

how long have you had to complete this project, and how long have you been working on it?

JFrustrationa at 2007-7-29 12:26:21 > top of Java-index,Java Essentials,Java Programming...
# 9

uhhh like 2 weeks havent worked on it every night had other projects in other classes to do.

sannitiga at 2007-7-29 12:26:21 > top of Java-index,Java Essentials,Java Programming...
# 10

and if u read in the Hints of the above assignment it says load the arrays in form load....what does that mean...form load?

sannitiga at 2007-7-29 12:26:21 > top of Java-index,Java Essentials,Java Programming...
# 11

You're going to fail.

Have a nice life.

cotton.ma at 2007-7-29 12:26:21 > top of Java-index,Java Essentials,Java Programming...
# 12

> and if u read in the Hints of the above assignment it

> says load the arrays in form load....what does that

> mean...form load?

"What does this part of the assignment mean" should be addressed to your instructor.

jverda at 2007-7-29 12:26:21 > top of Java-index,Java Essentials,Java Programming...
# 13

sorry everyone is being so harsh, but i do think that you should take time to understand your assignment before you expect others to

JFrustrationa at 2007-7-29 12:26:21 > top of Java-index,Java Essentials,Java Programming...
# 14

> uhhh like 2 weeks havent worked on it every night had

> other projects in other classes to do.

Seems you bit off more than you could chew when you chose all these tough intensive courses, then

georgemca at 2007-7-29 12:26:21 > top of Java-index,Java Essentials,Java Programming...