bert ngo

Greenhorn
+ Follow
since Nov 20, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by bert ngo

I apologize I will remember for next time to use real words.
15 years ago


DataInputStream dis = new DataInputStream(new FileInputStream("yourfile.dat"))



Thanks a lot i had a hard time thinking about how to reads this file cuz i didnt do alot with files in my previous course. I think i can handle the rest
thanks again!
15 years ago
im sry let me clarify wat i mean. first i cannot attach the file i need to read because it is a .dat file. So my professor has given me a file called Employee.dat and i need to read it. I need to be able to read the file so the following is defined:

EmployeeID - 3 bytes ASCII
Employee/Contractor Indicator - 1 byte ASCII 'E' for employee, 'C' for contractor
Department Code - 1 byte ASCII
First Name - 20 bytes ASCII blank padded
Last Name - 15 bytes ASCII blank padded
Salary - float single precision
Hire Date - 1 byte binary identifies the month, 1 byte binary identifies the day, 2 bytes binary identifies the year
Vacation Days - 2 bytes signed binary
Training - 1 byte

hope i cleared this up. O and the text i showed in my first post is the departments i need to have Employee.dat inputted into it. The numbers after each department will be its corresponding department code
A,Administration,302
E,Engineering,186
C,Construction,240
S,Sales,239
M,Marketing,250
15 years ago
Hi I just started my java data structure class this semester and part of my homework is to make a department report. The part where i'm having hard time thinking about is how to read a binary file hoping anyone could give a steer in the right direction to how to read binary files and then inputting that data into a department report. I know how to read the file that makes up the departments which i have shown below. I was thinking if the employee is a binary file would i have to use a DataInputStream?
thanks for the help

A,Administration,302
E,Engineering,186
C,Construction,240
S,Sales,239
M,Marketing,250
15 years ago
I have read Michael Dunn's idea with the cardLayout into a JFrame and it's been going well so far. Thanks Michael in pointing me in the right direction and the java tutorials are helping work out the cardLayout.
15 years ago
Hi,
I need some help getting my last assignment finish and I am having a hard time finding help with this one. The goal of this last assignment is to take 6 program examples the professor has provided and put them into one top level container. I need some assistance being pointed into the right direction with this one.

Thanks
15 years ago