辅导案例-COMP3910

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top

COMP3910 Assignment One

Due Date: Sunday, November 1, 2020 @ 10:00 pm in D2L (note extra credit for design delivery Oct 18).

ASSIGNMENT GOALS AND OBJECTIVES

This assignment allows you to refine and demonstrate skills such as:

• Creating a web application using JSF and Facelets
• Implementing a business layer in Java
• Designing an architecture that is ready for persistence and RESTful services
• Deploying on a Kubernetes cluster.
Note: this is a big assignment and you should start it before the midterm even though it is due after
midterms.

WORK TEAMS

This assignment may be done in teams of up to two people. This does not preclude the assignment being
done individually.
If two people work on the assignment, they should use one private gitlab.infoteach.ca project (with the
non-owner added to the project). The project should be called Comp3910-assignment-1. The welcome
page should indicate both authors of the project. The other author can fork the project as long as the
project is private and not accessible to the outside world or other students.
The project should be deployed to OKD in a project called lastName + firstInitial + “-“ +assignments. So
for the student Fred Bloggs, the OKD project should be called bloggsf-assignments. Each person
working on the assignment should have their own deployment of the final assignment (of course, you can
have multiple builds of the same project as it progresses if you want). Use the Wildfly builder image with
asst1 as the application and name. See Lab03 for details on the process.

REFERENCE

The following sources may be useful when you are working on this assignment:

1. 3910 lab assignments and your solutions.
2. Java reference material from outline and examples.
3. On-line help for the various tools you may use.

ASSIGNMENT DESCRIPTION

For this assignment implement the following:
The system is a distributed (or at least distributable) application with a GUI front end that uses
components which may eventually reside on the same or different machines. The components
encapsulate the functionality required to process the requests from the User Interface. For this
assignment, the components will be stored in session or application scope but may later access a database
to store persistent data.

The user interface is a web application using JSF and Facelets. The business components will be written
in Java. The web application will run on JBoss Wildfly 20.
The general architecture is shown in the following block diagram, with each box being able to run on a
different host. The GUI will be run by a web browser. The web application will be designed as a Model-
View-Controller system run by an application server. The JSF framework provides the controller,
Facelets pages provide the view, and CDI beans provide the model. The database connection may be
added in future assignments. In this assignment, the Database box is simulated by one or more Java CDI
beans.



Included in the assignment is a Java project (timesheet) which includes classes for the Employee, login
Credentials, and Timesheet/TimesheetRow, along with interfaces for some access classes. Use git to
clone this from https://gitlab.infoteach.ca/bdlink/timesheet.git You should provide an implementation
for the interfaces to help with your solution. If possible, use these resources without modification. You
can inherit the provided classes (this allows adding fields useful for the view, as well as CDI
scopes/names to a subclass without needing to modify the provided code). Note that JUnit tests are
included for nontrivial methods.
If you report bugs in the provided code, or suggestions to make the provided code more usable, the bugs
will be fixed, and the suggestions will be evaluated and may be added (by the instructor).
To use the given timesheet project do the following:
• In your project pom, include the dependency:

ca.bcit.infosys
timesheet
1.0.0

• In the repositories section add the following:

gitlab-maven
https://gitlab.infoteach.ca/api/v4/projects/17/packages/maven


• This will allow you to develop the project on your computers and in OKD
The system is a timesheet entry system. The system will allow a user to
1. login to the system with a username/password. A user will also have an employee number (E
Number) which is numeric as well as a first and last name. The user can change their password
once they login.
Graphical User Interface Buisness Layer Application Database

2. create/fill in/save a timesheet of activities performed in a specified week (not just the current one)
3. see a list of saved timesheets which has the date and total number of hours
4. view a timesheet previously saved (perhaps selected from the above list)
5. edit a timesheet for the current week or a future week.
The system will allow an administrator to do the following.
1) Login to the system with a username/password.
a) you can define how this works (document your decision)
b) you can read the administrator’s name and initial password from a properties file
2) Create/Read/Update/Delete users
3) Change a user password.
4) As a user, the administrator can do what other users can do.

Sample timesheet:

All of the fields in the time sheet can be entered through the application and stored in a (simulated)
database.
A new timesheet should have 5 empty rows for entry of project/workpackage times. There must be a
mechanism (such as clicking on a new-row button) for adding additional rows.
The project field is numerical; the WP field is a string. The combination of project and WP must be
unique within a timesheet.
Times entered in the week-day columns are in units of hours. Valid values are in the range [0.0 .. 24.0]
and may be integers or decimal with one fractional digit.
The header fields are filled in by the system automatically. The week number and week-ending fields
default to the current week.
The Total column and row are calculated based on the data in the week-day columns.

The user interface does not interface directly with a database, but should be able to make all needed data
manipulation requests through Java components. Think about the logical organization of the components
with a future database in mind. For the present assignment, you can store persistent data in application
E Number: 331 Week Number: 52 Week Ending: 12/12/2001
Name: Joe Bloggs
Project WP Total Sat Sun Mon Tue Wed Thu Fri Notes
132 AA123 4.0 4.0
132 AB112 2.0 2.0 Requested by Tracy
132 AA221 8.0 8.0
1205 12110 0.0
1205 13000 3.5 3.5
3710 12450 10.0 2.0 3.0 3.0 2.0
3710 32000 9.0 5.0 4.0
1202 45010 9.0 4.0 5.0
New Row
Total 45.5 0.0 0.0 8.0 8.0 11.5 7.0 11.0

scope. This will cause problems in the presence of multithreading (that you can ignore for this
assignment).
For the design, provide a class diagram and a sketch of the UI pages. A key part of the design of any
system is the interfaces between components. You can focus on the services that the GUI needs to satisfy
the user requests. Also provide screen designs for the user interface.
A typical design choice is to define classes to represent the data that needs to be stored (whether in a
session or a database). These classes have only getter and setter methods to extract the encapsulated data.
In Java, they should implement java.io.Serializable so they can be sent over the network. There will also
be classes to generate what is required to display the user interface. It is often necessary to provide a
layer of classes between the data classes and the user-interface classes.
Your solution must be user friendly and convenient for the user to carry out typical tasks.

DELIVERABLES
You must submit the following into the D2L assignment 1 dropbox (for each partner):
1) An assignment report, called report.pdf, containing:
a) The students who created the project
b) A link to the source repository project
c) Links to the deployed versions on OKD (one for each student)
d) A more detailed statement of requirements that your solution will satisfy, including a use-case
diagram.
e) A test plan for your solution, indicating reasonable test cases that will adequately test your
solution.
f) A detailed design of your solution, outlining design decisions, strategy, program organization,
menu structure, etc.
g) Images (screen snapshots) of all your forms.
h) Test results indicating thorough testing, and identifying any remaining issues with the code. Any
problems you highlight will be given half as many deductions as the ones we find.
i) Instructions for building and running your project.
2) One zipped file, called Comp3910-assignment-1.zip containing all the source files that comprise your
project. This file should be a zipped maven project. It should be possible to import it into eclipse,
where it can be built and run.
3) (Optional) Preliminary design document, called Design.pdf.
Ensure that your code follows rules of style such as used in Comp 1510. If you want, you can use the
Comp 1510 Checkstyle configuration (see https://gitlab.infoteach.ca/bdlink/comp-1510-examples/-
/blob/master/Comp1510Checkstyle.xml ).
Ensure that your Javadoc documentation follows the rules found in this document. Reference on Javadoc:
https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html
Your source code must be available in one of the student’s gitlab.infoteach.ca repository and deployed on
OKD as described above.

ASSIGNMENT SUBMISSION GUIDELINES

• Assignments are to be submitted before the above due date in D2L
• Late assignments will be accepted (subject to penalties outlined in the grading section)

GRADING

Assignments will be graded out of 30, with marks assigned for:

• Overall solution requirements and design (do the requirements make sense, is the design correct
and reasonable, is it documented, is it implemented as documented, are design decisions/assumptions
documented)
• Code quality (is the code commented correctly and adequately, and coding standards followed, is the
code robust and maintainable). This includes using message bundles and templates for the GUI.
• Program correctness (does the program work, does it work as expected, does it work as designed,
does it meet or exceed the requirements outline in the assignment description).

Some additional grading policies

• Assignments with undocumented or unstructured code will receive a grade of no greater than 50%.
• Assignments that do not work at all (cannot be run at BCIT) will receive a grade of no greater than
50%.
• Assignments that are copied will result in a grade of 0 (zero) for each party involved, as well as
disciplinary action as outline in the BCIT guidelines.

LATE ASSIGNMENTS

• Late assignments will be assessed a penalty of 10% (3/30) per day. Weekends count as one day.
• Assignments that are more than 10 days late will receive 0 (zero) marks.

BONUS MARKS

There are many ways to receive bonus marks on your assignment:

1) Complete the requirements/design work ahead of time
a) If you submit a complete requirements statement and design for your solution on or before
October 18th, and your final submission substantially implements your design as submitted, you
will receive a bonus of 10%.
2) Include additional functionality
a) Assignments which implement a complete solution to the problem and include significant
additional functionality may be assigned bonus marks (up to a total of 20%). To help your
chances, document what you think is the additional functionality in the assignment report.
b) Implement a non-English language for the user interface (English is also required).
3) Have a really nice user interface. At the marker’s subjective evaluation, up to 10% bonus marks will
be awarded to exceptional user interfaces. This may include formatting, colour scheme, appropriate
use of icons or images, as well as ease of use.
4) Research and significantly use third party JSF tags, such as Primefaces.. Bonus marks up to 10%.









欢迎咨询51作业君
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468