Results 1 to 4 of 4
- 09-13-2011, 01:40 PM #1
Member
- Join Date
- Sep 2011
- Posts
- 1
- Rep Power
- 0
need a simple code for the following
Read Departments and Employees from a file, and print a sorted list of employees for a specified department.
Assume the file follows the following data:
Dept:10, Accounts, Boston
Emp:1, john, doe, 10000
Emp:2, jane, doe, 20000
Emp:3, sarah, smith, 30000
Dept:20, Development, Moscow
Emp:4, ivan, pavlov, 10000
Emp:5, dmitry, panov, 20000
Emp:6, sergei, meigyesi, 30000
Dept:30, Marketing, Beijing
Emp:7, yao, ming, 20000
Emp:8, michelle, yeoh, 30000
Provide the following command line menu:
1. Read from file // if the user chooses this option, ask for file name and load the above data from that file
2. Print sorted list of all departments
3. Print List of all employees for a department, sorted by name
4. Print List of all empoloyees for a department, sorted by salary
note: The data of the employees contain lower-case data for names. But you will print the employees in Title Case.
From the data in the file, I need to see the part of the line before the first ":" to know whether it is
a dept record or an emp record then, from the data after the ":", i need to take the data between the commas and
construct a Dept object or an Emp object then i need to do the sorting of the emp objects as per the menu
option chosen by the user, as mentioned in the question.
-
Re: need a simple code for the following
I think I speak for all in wishing you the greatest success in creating this code and in passing your assignment. But please understand that we are not here to provide you with "simple code for the following". Please show us *your* code and ask any specific questions, and we'll be more than happy to help.
- 09-13-2011, 02:44 PM #3
Re: need a simple code for the following
Have you started writing the program yet? or are you still in the structural programming development stages?
My API:Java Code:cat > a.out || cat > main.class
- 09-14-2011, 01:24 AM #4
Member
- Join Date
- Sep 2011
- Posts
- 18
- Rep Power
- 0
Similar Threads
-
How does this very simple code work?
By Codeless in forum New To JavaReplies: 1Last Post: 11-29-2010, 11:43 PM -
Simple code. Could you help pls..?
By Iliyas in forum New To JavaReplies: 8Last Post: 12-26-2008, 03:17 AM -
Simple code help
By rednose in forum New To JavaReplies: 11Last Post: 11-30-2008, 06:02 AM -
Please help me this is simple bit of code
By BlitzAcez in forum New To JavaReplies: 4Last Post: 11-27-2008, 05:52 AM -
simple code
By elizabeth in forum New To JavaReplies: 1Last Post: 08-07-2007, 06:49 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks