I need help on Driver-Test
COSC 1437 Aggregation and Composition lab (testing and feasibility development) Students should separate themselves into groups of 2 to 3. The students should read the following design specifications and decide how they want to make their system work. Each student will take a part of the system and code that with the goal of making it work with their partner’s code. Obviously, there needs to be communication back and forth to make sure they systems line up, but each part should be built individually by a student. If you are not here on the day that this is started you can try to find a group with other students that were also not here. If you cannot find a group please bring this to the instructor’s attention as he will assist you in finding a group. The assignment will be graded on the systems satisfaction of the follow design points. Concentrate on where responsibilities should lie and how data is accessed. Coordinate carefully with your teammates so that the project is consistent in terms of naming, style and design ideas. I am mostly looking for main ideas within this lab, do not get caught up with details unless you have the main ideas down first. There may be some… holes, in the design. Some can be assumed very clearly but others could require the students to ask the client (me) for clarification. Management The management side of the construction firm manages equipment (and the people that use it) of which only certain workers are trained to use. Workers also have time cards which detail when and how they work. Workers work in shifts (either morning, afternoon, or night). This part of the project provides the resources that the construction side needs to use to do its job. Management should be responsible for keeping track of workers and making certain that workers cannot work multiple places at one time. In simplified terms, the management’s job is to store workers/equipment and allow someone to request them and return them. The main problem here is storing when someone can work and when they can’t. Main Requirements: · Management has-an Equipment · Equipment and Worker are somehow associated · TimeCard is-part-of Worker Additional Requirements: · Management is a class that will coordinate equipment and employees with the construction side of the project. Management’s job is to hold a record of each employee and provide a single point of contact for recruiting additional employees to a job. · Equipment has a name. Equipment also has a cost to use (money) which will be enumerated later in the driver section. Equipment also have valid times when it can be used. For instance, some equipment may only be used at night. Additionally, some jobs do not allow more than 1 of a particular piece of equipment to work at a time, or require more than 1 of something to get a job done (i.e. 2 cranes to put up a new roofing structure). · Each worker has a set of equipment (that management tracks, since that is their property) that is dedicated to him and likewise each worker uses that set of equipment to complete his job. An electrician needs equipment (wires, nails, electrical housings…) to do his job. Likewise, a backhoe needs a worker to do their job. Worker and Equipment have a 1 to 1 relationship and workers do not share equipment. · Worker will have a name (and other personal information) and a salary. It will defer shift or work related inquiries to the TimeCard. · The worker and/or timecard should calculate a worker’s salary based on the data it knows (this calculation shouldn’t be in Construction because it would be a conflict of interests – construction wants to keep their costs down so they may not bust their tail making sure the worker gets all the pay they should get) · TimeCard coordinates when a worker can work – he cannot work on multiple projects on the same shift. The shifts for working on each project are morning, afternoon, and/or night. · He can work morning at one job and afternoon at another and potentially evening at a third without issue (assume there is some time between shifts for adequate travel). Questions to ask: · Why are timecard and worker separate classes? Answer: security, worker object may be given as a reference and all its information (address, name, what type of employee he is) may be freely accessed but the timecard should be private and all its information should be protected. · Worker’s information is largely public information (name, address…), while his timecard should be more guarded since that determines his pay and when he can and can’t work. · How to store the work schedule within the timecard for the worker? · This one is more up to you guys and may take some group planning. I would suggest some type of array of dates (project day and shift), but there are plenty of ways to do this. You do not need to use arrays but they give you the most flexibility. · How to handle when someone is working: · you can set a Boolean: isWorking = true, or you can have a schedule arrays of booleans: schedule[day][shift] = true, or you can remove the worker reference from the array of available workers (and add them back to the array when shift is done). It does depend on what you want to do as a group and how your schedule is stored as to how you want this to work. · I don’t understand the difference between Equipment and Worker? · Worker stores the personal information of the employee, whereas Equipment class stores the professional information. Equipment class is where you would store a worker’s expense account and materials requests and stuff like that (that I am omitting from this lab). Worker is where you store vacation and insurance information and any personal information. This division is just made to separate the responsibilities into two different classes but yes they largely function in the same way. · Should we pass Workers or Equipment to and from the Management and Construction? · Either – Construction needs to know what the worker is satisfying (are they a plumber or a carpenter) so they need that info, but they will also need the salary info from the worker’s timecard (which they will have to access through accessor methods since timecard information will be private). You will need to have some relationship between the two classes (one needs to store the other) to make this work. Construction On the Construction side we have a team that is led and managed by a Foreman. The foreman needs to request/rent equipment from management when needed for the least amount of money possible. ConstructionTeams must pay workers by shift, which will add to the cost of the project. Unfortunately, there are times when workers are assigned to a project but cannot do their job (because they are waiting on someone else). It is the foreman’s job to coordinate this. Theoretically, we would use complex algorithms to maximize efficiency here, but for this class we are going to concentrate on getting this to work at all. The construction side uses management to provide them the resources to do their job. Foreman requests equipment from the Management side as needed for each project and attempts to complete all the projects simultaneously. In simplified terms: the projects have things we need to do, the construction side’s job is to request workers to do them and to calculate the cost each shift for all of this. · ConstructionTeam has-a Project · ConstructionTeam has-a Worker (workers are added as they are used on the project) · ConstructionTeam is-part-of Foreman · Like how workers can work 3 shifts – morning, afternoon and night, projects will advance through these 3 phases with workers satisfying requirements each phase until it is completed and the project is finished. · Project has a number of equipment needs (in order to complete the project). Equipment needs may come in order or may be done concurrently (one equipment job may need to be done before another, or certain things may need to be done at the same time). · Projects should also know the type of project it is and the length of the project · It is the foreman’s job to request equipment from management when needed (meaning he is the only one who knows about the management side, meaning project or construction team should not request equipment except through him). · For each worker in the construction team the foreman has to pay additional expenses it terms of coordination. The cost per shift increases by 10% (of the total equipment cost) per worker. (Total amount of workers in shift *.10 * Worker’s Salary + Worker’s Salary) · For each day (3 shifts) the project runs the Construction team must also pay $1000 dollars for coordination of the project. (If the project is not started yet the fee is only $200 dollars.) Questions to consider: · How do we store the project requirements? And their order? · Short answer is that you may need more classes than are listed here. · Why are the foreman and construction team separate? · It has to do with responsibility. The construction team is responsible for their individual project and team of workers. They then advocate only for their project. But the foreman has to consider all of the projects he is assigned and potentially stealing one worker from one project (and setting it back 1 day) may help another project more (saving a week on it). A final note Worker or Equipment (depending on your design) is the only class shared between the two sides, and thus there needs to be some level of coordination on how this class will work. It is okay if there are two versions of this class (1 for management and 1 for construction), but make sure the class names reflect this. Be careful with your class names as well. I realize ideas and plans change but update class and variable names before submitting the project. Also clean up any commented out code (unless it is there as the final submission for that topic). Driver (test-driven-design) This is where you will test the structures made in the other parts of the lab. This is only a test of the system to see if it works, not the final system a client would use. Note that the program should be able to handle any amount of data of the following type (so none of this should be hardcoded outside of the driver). Additionally, I do not want ANY input from a user at this point as we are only testing. Again, this is just a test, and therefore you may hardcode this in (again, so long as it stays in the driver). If you hardcode things outside of the driver you are no longer testing the system but instead you are limiting it to those constraints. Equipment provided to management: · Management needs 2 cement truck/pouring systems.