8601,sales,9:00,19:00
8602,maintenance,10:00,20:00
8603,maintenance,19:00,23:00
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
All things are lawful, but not all things are profitable.
Sander Hoovenaar wrote:Yes I did. Since I just started, it is far from complete, but it might give you an idea of how I want to design this class and what I expect objects of this class to do.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Junilu Lacar wrote:An alternative to having the Employee be responsible for parsing files and initializing Employee objects is to assign that responsibility to a class that would be more tightly coupled to the input file and its format, say an EmployeeFileReader.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Good idea. That shows the problems with reading from files; you have to couple a class to the format of the file.Junilu Lacar wrote:. . . a class that would be more tightly coupled to the input file and its format, say an EmployeeFileReader. . . .
Winston Gutkowski wrote:
Mind you, it begs the question whether it shouldn't actually be Employee.FileReader.
Also: a change to a file format could indicate a change to the Employee class itself (eg, to add an attribute), or vice-versa - a change to the Employee class mandates a change to your file format - so you wouldn't want to separate them too much.
Sander Hoovenaar wrote:I am still a novice, but I am eager to learn. I would like to change things step by step and check all the changes I make instead of jumping into the deep.
How can I check (beside that it compiles) that it actually has put in the data well?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
All things are lawful, but not all things are profitable.
Sander Hoovenaar wrote:Could you give a hint?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
All things are lawful, but not all things are profitable.
Sander Hoovenaar wrote:About modelling time as a String. I found this earlier to calculate time differences, and thought it would be useful. I would like to determine in hindsight the time an operation took, but I also want to estimate times, e.g. simply adding 2 hours to a start time.
All things are lawful, but not all things are profitable.
Carey Brown wrote:Wow. The error message is telling you exactly what is wrong. It says you are missing a 'return'. So, return the list you've built.
How am I able to display this ArrayList in the main-method class?
All things are lawful, but not all things are profitable.
Yeah. What he said. Totally. Wait. What? Sorry, I was looking at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|