Find Jobs
Hire Freelancers

Scheduler

$30-5000 USD

Completed
Posted over 21 years ago

$30-5000 USD

Paid on delivery
Purpose: To refresh your programming knowledge and give you some experience with the features of Java and fundamental object-oriented programming. -------------------------------------------------------------------------------- Program Specification In this project, you will design and implement a program which manages the time-schedules of part-timers for a small company. The program first reads in a batch file ([login to view URL]) which contains the schedules of already hired part-timers. After processing the batch file, the program works in interactive mode. In interactive mode, the user of the program (maybe a manager) can add the schedules of other part-timers depending on currently available time slots or delete the schedules of existing part-timers from the database. Using display option, the user can display the weekly-schedule (from Sunday to Satursay) of current part-timers on the screen. When the user quits the program, it generates an output file ([login to view URL]) which contains a weekly-schedule of part-timers starting from a user specified date. To make a problem simple, assume that a multiple of 30 minitues is assumed to be assigned to each [login to view URL] is the sample input file: Input file SMITH;STH;12:00pm;12:30pm; JOHNSON;MW;2:30pm;3:30pm; BROWN;MWF;9:30am;10:30am; DAVIS;MWA;1:30pm;2:00pm; MOORE;SMTWH;4:30pm;5:00pm; In summary, the program itself, from now on let's call it Scheduler, is operated from the command-line. The user is prompted to enter the name of the file to read time-schedules from. The program reads the file and processes each schedule in the file. After processing the file, now the Scheduler operates in interactive mode. The interactive options are add, delete, display and quit. Scheduler reads and processes the interactive input until the user explicitly enters quit. Here is a script from a sample interaction with the Scheduler program. C:\46B\HW1>java Scheduler Welcome to the Scheduler program ! Today is Jan 22 20 ## Deliverables Enter the initial schedule file name:[login to view URL] Here is the schedules: SMITH;STH;12:00pm;12:30pm; JOHNSON;MW;2:30pm;3:30pm; BROWN;MWF;9:30am;10:30am; DAVIS;MWA;1:30pm;2:00pm; MOORE;SMTWH;4:30pm;5:00pm; Enter one of the following option add delete display quit display Sun noon-12:30pm:SMITH 4:30pm-5:00pm:MOORE Mon 9:30am-10:30am:BROWN 1:30pm-2:00pm:DAVIS 2:30pm-3:30pm:JOHNSON 4:30pm-5:00pm:MOORE Enter one of the following option add delete display quit add Here are available time-slots. S: 9:00am--noon 12:30pm--4:30pm M: 9:00am--9:30am 10:30am--1:30pm 2:00pm--2:30pm 3:30pm--4:30pm T: 9:00am--noon 12:30pm--4:30pm W: 9:00am--9:30am 10:30am--1:30pm 2:00pm--2:30pm 3:30pm--4:30pm H: 9:00am--noon 12:30pm--4:30pm F: 9:00am--9:30am 10:30am--5:00pm A: 9:00am--1:30pm 2:00pm--5:00pm Enter the schedule to be added. [lastname;MTWHFAS;8:00am;9:00am] ALLEN;ST;1:30pm;2:00pm; Enter one of the following option add delete display quit delete Enter the schedule to be deleted. [lastname;MTWHFAS;8:00am;9:00am]. MOORE;MH;4:30pm;5:00pm; Enter one of the following option add delete display quit quit This program writes your one week schedule to a file called [login to view URL] Please enter the starting date of the desired schedule [MM/dd/yy]. 01/25/2003 You need to write Time, PartTimer, DailySchedule, DateBook and Scheduler classes. A few helper utility classes (ConsoleReader, SimpleFileReader, SimpleFileWriter and Convert) will be given to you. The below is an overview of each of the classes you need to write. 1. public class Time The Time class represents start and end times of work. It is not a very complex class, so it is a good one to implement early. The Time class defines three instance variables. private int hour; private int minute; private boolean isMorning; // true: am, false: pm Think through what operations you will need to manipulate times and include them as methods for the Time class. One of the useful methods of Time class would be a method to compare two different Time objects. At some point, your program need to compare two Time objects to store them in the order of start time. Here is an example of comparison methods. public int compareTo(Time t2) If [login to view URL](t2) < 0 then t1 is earlier than t2. If [login to view URL](t2) > 0 then t1 is later than t2. If [login to view URL](t3) ==0 then t1 and t2 represent the same time. You may also want to implement methods to print a Time object to a file (printTime) or to a screen (showTime). public void printTime(SimpleFileWriter writer) // to a file public void showTime() // to the screen It checks the values of instance variables of the Time object and prints them in the form of hh:mmam or hh:mmpm to a file/screen. Note: To correctly print a Time object, you need to understand what the stringToTime method of the Convert class does. The stringToTime method converts a Time in a string format into a Time object. For example, "1:30:am" will be converted into a Time object with hour = 1, minute = 30 and isMorning = true. One of the things you need to be aware of is that the method converts 12 in the hour part of the string into the hour 0 of a Time object. For example, "12:13pm" will be converted to a Time object with hour = 0, minute = 13, and isMorning = false. The String "12:00pm", which is noon, will be converted to a Time object with hour = 0, minute = 0 and isMorning = false. You may implement accessor methods to get the value of private instance variables. Here is an example of the accessor methods. public int getHour() { return hour; } Before moving on, write some simple test code that exercises the Time class and allows you to find and correct any errors. You may put your test code in a static main() on the Time class itself and compile and run the Time class. After testing, make sure to delete the test code from the Time class. 2. public class PartTimer The PartTimer class rep ## Platform Please go to website [login to view URL] and click on homework and then homework 1 for all the specifications. I cant fit it all here
Project ID: 2906252

About the project

5 proposals
Remote project
Active 21 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$21.25 USD in 14 days
4.9 (7 reviews)
3.3
3.3
5 freelancers are bidding on average $25 USD for this job
User Avatar
See private message.
$21.25 USD in 14 days
5.0 (37 reviews)
5.4
5.4
User Avatar
See private message.
$25.50 USD in 14 days
5.0 (17 reviews)
4.2
4.2
User Avatar
See private message.
$56.10 USD in 14 days
4.8 (39 reviews)
3.7
3.7
User Avatar
See private message.
$34 USD in 14 days
5.0 (8 reviews)
3.6
3.6
User Avatar
See private message.
$21.25 USD in 14 days
4.9 (12 reviews)
2.8
2.8

About the client

Flag of UNITED STATES
United States
5.0
11
Member since Feb 6, 2003

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.