Task To Demo Programming Prowess
Task To Demo Programming Prowess
1) Enable to add employee details like name, age, city, state, county in an
ASCII table, emp.txt, (text file, not in any RDBMS).
Validation: You can enter name with numerals along with alphabets. You can not
enter age with alphabets. Age will have a limit (from 18 to 65).
2) Enable to add department details like description in an ASCII table,
department.txt.
Validation: The department description may not have numerals.
3) Enable to link an employee to a department with start and end of working
dates. Please add more ASCII tables as necessary.
Validation: Dates should be in mm-dd-ccyy format. You should not assign more
than one department to an employee at any point in time (in other words,
employees' tenure in one department can not overlap his tenure in another
department). Enable to change the department assigned to an employee with
appropriate start and end dates. When an employee is assigned to a department
(and is working there), you can not create another record to assign that
employee to the same department. However, employees can be assigned to any
department different from the current department (including departments in which
they may have worked earlier).
4) Enable to enter a date. The program should list the employees and their
departments for that date.
Eg., if you enter a date as 20-Jan-2011, your result will be:
-------------------Employees working on: 20-Jan-2011.
Employee
Department
B
Y
C
X
-------------------5) Enable to enter two dates (a date range). The program should list the
employees working during that date range with start and end dates. If an
employee was assigned to three different departments within that date range,
your program will list the name of the employee three times with the start and
end dates in each department.
Validation: The end date should be later or the same date as start date but it
can not be earlier than start date.
Eg., if you enter: Start Date: 01-01-2011 and End Date: 12-31-2011, your result
will be:
-------------------Employee
Department
Start Date
End Date
A
Z
01-02-2010
30-06-2011
A
Y
01-07-2011
Current
C
X
15-01-2011
02-12-2011
-------------------Please develop your own software. You will be asked questions on your source
code.
All The best. Hope you will give your greatest efforts. Again, please do not
hesitate to get in touch with us if you have questions.