Expert Answer:CMPSC 211 assignment 6 room scheduler

Answer & Explanation:The assignment discription is in the uploaded files underneath are some supporting materials. There are multiple videos that I can’t upload through studypool, you can give me a email address so that I can send you all the Programming Assignment 6 Test ScriptThis is a scenario that you can use to test Programming Assignment 6. It is not an exhaustive test, but tests almost all of the conditions your program should handle.When you submit your PA 6, all the tables in the database should be empty except the Rooms Table and the Dates Table. The Rooms table should contain three rooms, such as 101 with 60 seats, 102 with 40 seats, and 201 with 20 seats, which will be used in this script. The Dates table should contain two dates, which will be expressed as date1 and date2 in this script.This scenario assumes that is the case.The faculty names will be a, b, c, d, etc. to simplify input and this script.The dates will be real dates but will be represented in this script by the symbolic names date1 and date2.Script:-Add faculty aNote: after adding a faculty, the faculty should appear in the drop down list on the Reserve panel.-Add faculty b-Add faculty c-Add faculty d-Add faculty e-Reserve a, date1, 20a reserves room 201-Reserve b, date1, 50b reserves room 101-Reserve c, date1, 50c gets waitlisted-Reserve d, date1, 40d reserves room 102-Reserve e, date1, 20e gets waitlisted-Reserve c, date2, 20c reserves room 201-Status date1 a reserved 201 b reserved 101 d reserved 102-Status date2 c reserved 201-Status Waitlist c date1 50 e date1 20General conditions of testing:the results of any action are displayed to the user immediately after the action is performed without the user needing to check Status.All affected combo boxes are updated immediately after each action is performed.Creating a timestamp field in JavaThe following is sample code to insert a Timestamp field into a table column:// declare a timestamp field. java.sql.Timestamp currentTimestamp = new java.sql.Timestamp(Calendar.getInstance().getTime().getTime());// use the timestamp in an insert to the wait list. getWaitList = dbConnection.prepareStatement(“insert into waitlist (flight, day, customerName, timeStamp) values (?, ?, ?)”); getWaitList.setString(1, entry.getFlightName()); getWaitList.setString(2, entry.getDay()); getWaitList.setString(3, entry.getCustomerName()); getWaitList.setTimestamp(4, currentTimestamp); count = getWaitList.executeUpdate(); Make sure the column in the database table is specified as Timestamp and not Time.
pa6_grading_rubric_room_scheduler.docx

roomscheduleralacvsample.zip

room_scheduler_design_layout.pdf

roomschedulerfinalproject.pdf

Unformatted Attachment Preview

PA6 Grading Rubric – Room Scheduler
Point deductions below are given in percentages. This is a 300-point assignment, so the point
deductions will be 3 times the numbers listed below.
Late policy of 4% per date late and using good object-oriented coding still apply.
Copying code from the internet does not count as writing your own code. Do not do this.
A good way to check your code is to use the test script provided.
There are four parts to this part of the project:
Adding a faculty, adding a reservation for a faculty, room, and date, displaying the faculty
reservations for a specific date, and displaying the waitlist.
Preferably, the code you submit will be only for part 1, but if your code includes functionality
for the second part of the project, that’s ok too; we will only grade for the functionality for part
1 (so you need to make sure all parts for part 1 still work).
Database and project considerations:
• When you submit your project, you MUST submit both your code and your database (-5
if you fail to submit your database when you submit your code. We need it to grade
your assignment.)
• You need to close your project before you zip the database otherwise the graders will
receive errors when they grade it.
• You must submit the zip of your entire NetBeans project folder instead of just the .java
files
• Your database should have the username and password of ‘java’ and ‘java’ as per the
directions
• Your database must be preloaded with several rooms and dates (-5 for an empty
database)
• Your preloaded database must have empty reservations/waitlist tables (-5 for not
following these directions)
• Every room should be able to be reserved on every date. In other words, you should not
have rooms associated with specific dates in your database unless it is through the
reservations table. If you find that confusing or have questions about that, talk to Al or
a TA. (-10)
• You should have the following tables in your database with the appropriate columns:
Rooms, faculty, dates, reservations, waitlist (can optionally be combined with the
reservations table) (-10 for each table)
o You should also have the appropriate primary keys. For example, you should not
be able to add two people with the same name to your Faculty table
• You must use SQL Prepare Statements (-10) when updating the database
Functionality:
• Correctly adding a faculty to the database (-10)
• Correctly adding a reservation to the database (-10)
• Correctly checking status by date (-10)
o For status by date, you should display the name and room of the faculty that
have a room reserved on that date.
• Checking waitlist (-10)
o Note: You should only display the waitlist here.
o For waitlist, you should display the faculty name, the date, and the number of
seats that the faculty is waitlisted for.
• If a room is not available, the faculty reservation should be put on the waitlist (-10)
• If rooms are available, the faculty will be assigned the smallest room for the requested
date (-10)
• The priority order of the waitlist must be maintained (-5)
o It is strongly recommended that you use Timestamp to keep track of a faculty’s
position on the waitlist
GUI:





Although the tab layout is recommended, it is not required. If you designed your GUI
using a different type of layout, that’s totally fine – just make sure you have all the
required pieces of functionality and show all the appropriate information.
You should have combo boxes to select the faculty, and date when making a reservation
or checking the status (-2 for each combo box missing)
The combo boxes should be updated automatically when additional data is added to the
database (-3)
When a command is performed, the results of that command should be displayed to the
user without the user needing to check the status to see what was done. For example, if
you add a faculty to the database you should display the name of the faculty that was
added and if the faculty was added to the database successfully. Likewise, after adding
a reservation, you should display which room was reserved on which room on what
date. If all rooms are reserved, you must display information that the faculty
reservation was added to the waitlist
How you want to display status information is up to you, but it must include all
necessary information and be readable to the grader.
Room Scheduler Design Layout
Classes
Properties
Faculty
*Name (String)
RoomEntry
*Name (String)
Seats (Integer)
*Date (Date)
Dates
ReservationEntry
WaitlistEntry
*Faculty (String)
*Room (String)
*Date (Date)
Seats (Integer)
Timestamp (Timestamp)
*Faculty (String)
*Date (Date)
Seats (Integer)
Timestamp (Timestamp)
RoomQueries
ReservationQueries
WaitlistQueries
DBConnection
Connection (Connection static)
Methods
addFaculty
getAllFaculty
Constructor
getters
getAllDates
addDate
Constructor
getters
Constructor
getters
getAllPossibleRooms
addRoom
dropRoom
getReservationsByDate
getRoomsReservedByDate
addReservationEntry
cancelReservation
getReservationsByFaculty
deleteReservation
getWaitlistByDate
getWaitlistByFaculty
addWaitlistEntry
cancelWaitlistEntry
deleteWaitlistEntry
getConnection
Note: There may be other methods needed in your classes. This list is not all inclusive.
Data Base Tables
The Data Base tables have a one to one correspondence with the classes above that contain properties. This is the advantage of Object-Oriented
Design, the data from a table is the data for a class object. So, in this project, the tables would be:
Faculty
Rooms
Dates
Reservations
Waitlist
Then we need to figure out what the columns of each table will be. That is also easy, it is just the properties of each of the classes above. For
example, the Rooms Table would have the columns: Name, Seats. The only other thing we need to figure out is what is the primary key for each
table. That would be the columns from each table that will make an entry unique. The properties that have * in front of them make up the primary
key for each Table.
3 Tier Application Development
GUI Code
Classes Code
Data Base Tables
Room Scheduler Initial Phase – Programming Assignment 6
You have been asked to develop a Room Scheduling application for Tiny College.
This college has only one building in which to schedule rooms. The Tiny College can
reserve one room per Date per faculty, for each Date the rooms are available. The
rooms are reserved by Faculty name. Faculty can request a room reservation for a
specific Date based on the number of seats they require. The room will be assigned by
the program, faculty do not get to request a specific room. Each Date is just a specific
Date. Faculty are identified by a single name.
This application should have a very nice GUI interface and will be a database driven
application. The database used will be Derby. This application must use good ObjectOriented Design and Programming. The database must use good Object-Oriented
Design and Programming. There is a very close correlation between Object-Oriented
Design and Database Design. Your application design should include at least four
classes besides the main GUI class, e.g. Faculty class, Room class, Date class…,
Reservations class, etc. Your database accesses should be in the classes that correlate
with the database tables.
This assignment is the first half of the final project and will be submitted as
Programming Assignment 6. This phase of the project will implement the following user
commands:
Add Faculty
A faculty member is added to the database. The faculty member is identified by only
one name.
Reserve Faculty Date Seats
The faculty member will be assigned a room for the requested Date, if there are
seats available. The rooms will be assigned in a best fit manner. The faculty member
should be assigned the smallest room that has enough seats for their request. If there
are no rooms available or no rooms with enough seats available, the faculty member
will be put on the wait list for that Date. The waiting list must be maintained in the
order the faculty members tried to reserve their rooms.
Status Reservations by Date
The Status command by Date will display the faculty members that have rooms
reserved on that Date.
Status Waiting List
The Status command for the Waitlist will display all the Faculty members waiting for
rooms. It will be displayed in Date order and then in the order of when the reservation
was requested.
Testing scenario:
A testing scenario will be provided to assist you in testing this application.
Database considerations:
The Rooms Table should be preloaded with several Rooms such as 101, 102 and the
number of seats in the room. You should have a different number of seats per room so
that you can test the proper reservation of rooms for different class sizes. You will be
shown how to preload tables with values.
The Date Table should be preloaded with several Dates of your choice. These are
just normal Dates.
The database tables should not contain redundant data, i.e. relevant data should
only appear in one table.
GUI Guidelines:
The user should be required to enter only unknown data. Drop down lists of known
data such as Faculty member names, Room names, or Dates should be displayed for
the user to select. Combo Boxes should be used for the drop-down lists on the form.
When information is requested to be displayed e.g. for a Status command, all of the
requested information must be displayed. When a command is performed, the results of
that command should be displayed to the user on the same display without the user
needing to check Status to see what was done.
For this assignment, you may, and I recommend, the use of the GUI designer in
NetBeans.
Submission Guidelines:
Don’t forget to submit your PROJECT files and your DATABASE files. The database
folder is probably located under
“Users/USERNAME/.netbeans-derby/NAME_OF_DATABASE”.
Zip the ENTIRE database folder and the ENTIRE project folder and submit the two
zipped files in the dropbox under one submission.
Note:
Your project must be created with the name ‘RoomSchedulerNameID’, where Name
is your name and ID is your psu account id, e.g. xxx1234. The database must be
created with the name ‘RoomSchedulerDBNameID’, and a username and password
of java and java. The database when submitted for PA 6, should contain data for the
Rooms and Dates tables. All other tables should be empty.
Grading Criteria:
In this project I will be looking for good OO design practices and this includes:

Use of getter and setter methods for class variables

Good naming of your classes, methods and variables

Correct use of static and non-static methods

The way you split this project into classes.

All of your updates to the database must be done using SQL statements, do
not use ResultSetTableModels to update the database.

If a SQL statement to update the database needs to contain a variable, then
you must use PreparedStatements, do not use concatenation of strings to
create the SQL statement.
Note: A good example to use for how to program this assignment is contained in the
programming examples in Figures 24.30, 24.31 and 24.32 in Chapter 24 from our book.
Room Scheduler Final Phase
You have been asked to develop a Room Scheduling application for Tiny College.
This college has only one building in which to schedule rooms. The Tiny College
reserves one room per Date per faculty, for each Date the rooms are available. The
rooms are reserved by Faculty name. Faculty can request a room reservation for a
specific Date based on the number of seats they require. The room will be assigned by
the program, faculty do not get to request a specific room. Each Date is just a specific
Date. Faculty are identified by a single name.
This application should have a very nice GUI interface and will be a database driven
application. The database used will be Derby. This application must use good ObjectOriented Design and Programming. The database must use good Object-Oriented
Design and Programming. There is a very close correlation between Object-Oriented
Design and Database Design. Your application design should include at least four
classes besides the main GUI class, e.g. Faculty member class, Room class, Date
class…, Reservations class etc. Your database accesses should be in the classes that
correlate with the database tables.
This assignment is the final half of the project. The final project is a continuation of
Programming Assignment 6. This phase of the project will additionally implement the
following user commands:
Add Room Seats
Add a new Room to the system. The Room name is a string and Seats is the number
of seats in the Room. When a room is added, the wait list must be searched for any
faculty waiting for a room for all Dates that rooms are reserved and reserve the room
for them and remove them from the waiting list.
Add Date
Add a new Date that rooms can be reserved to the system.
Cancel Reservation Faculty Date
The reservation for that Faculty member and Date must be removed from the
Room’s reservations or the waiting list. If the reservation is removed from a room, the
waiting list must be checked to determine if another Faculty member can be booked for
that room for that Date, checking the number of seats requirement, of course.
Status Faculty member
The Status command for a Faculty member will display the Room and Date for each
room the Faculty member has reserved and/or is waitlisted for.
Drop Room
The Drop command must remove a room from the application. Any faculty members
that had this room reserved for any Date will get another room reserved for that Date if
possible, in priority sequence, and the new reservation reported to the user. If the
faculty member cannot get a new room reserved, the user is informed that the faculty
member could not get a new room reserved and that they have been placed on the
waitlist.
Testing scenario:
A testing scenario will be provided to assist you in testing this application.
Database considerations:
The Room and Date Tables no longer need to be preloaded with values. When
submitted, all database tables should be empty.
The database tables should not contain redundant data, i.e. relevant data should only
appear in one table.
GUI Guidelines:
The user should be required to enter only unknown data. Drop down lists of known
data such as Faculty, Rooms or Dates should be displayed for the user to select from.
Combo Boxes should be used to categorize data on the form. When information is
requested to be displayed e.g. for a Status command, all of the requested information
must be displayed. When a command is performed, the results of that command should
be displayed to the user on the same display without the user needing to check Status
to see what was done.
For this assignment, you may, and I recommend, the use of the GUI designer in
NetBeans.
Submission Guidelines:
Don’t forget to submit your PROJECT files and your DATABASE files. The database
folder is probably located under
“Users/USERNAME/.netbeans-derby/NAME_OF_DATABASE”.
Zip the ENTIRE database folder and the ENTIRE project folder and submit the two
zipped files in the dropbox under one submission.
Note:
Your project must be created with the name ‘RoomSchedulerNameID’, where Name
is your name and ID is your psu account id, e.g. xxx1234. The database must be
created with the name ‘RoomSchedulerDBNameID’, and a username and password
of java and java. When your database is submitted, all tables should be empty.
Grading Criteria:
In this project I will be looking for good OO design practices and this
includes:

Use of getter and setter methods for data

Good naming of your classes, methods and variables

Correct use of static and non-static methods

The way you split this project into classes

All of your updates to the database must be done using SQL statements, do
not use ResultSetTableModels to update the database.

If a SQL statement to update the database needs to contain a variable, then
you must use PreparedStatements, do not use concatenation of strings to
create the SQL statement.

Purchase answer to see full
attachment

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more