0% found this document useful (0 votes)
59 views9 pages

Java SE 8 Training Exam Guide

The document describes two programming problems to practice Java SE 8 features including classes, objects, collections, streams, filters, OOP, exceptions, and JDBC. Problem 1 involves creating classes to represent a phone book with contacts and methods to input, find, delete, and save contacts. It is estimated to take 60 minutes. Problem 2 involves developing an application with layers for the application logic, domain objects, and data access using JDBC. It has requirements for the architecture, technologies, and technical implementation. It is estimated to take 120 minutes.

Uploaded by

khoa20033002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views9 pages

Java SE 8 Training Exam Guide

The document describes two programming problems to practice Java SE 8 features including classes, objects, collections, streams, filters, OOP, exceptions, and JDBC. Problem 1 involves creating classes to represent a phone book with contacts and methods to input, find, delete, and save contacts. It is estimated to take 60 minutes. Problem 2 involves developing an application with layers for the application logic, domain objects, and data access using JDBC. It has requirements for the architecture, technologies, and technical implementation. It is estimated to take 120 minutes.

Uploaded by

khoa20033002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Java SE 8 Programming Language

T ra in in g Ex am s

Document Code 25e-BM/HR/HDCV/FSOFT

Version 1.1

Effective Date 20/11/2012

Hanoi, Apr/2019
Java SE 8 Programming Language Issue/Revision: 1.1

RECORD OF CHANGES

No Effective Date Change Description Reason Reviewer Approver

1 18/Apr/2018 Add a new exam Add DieuNT1 VinhNV

2 26/Apr/2019 Update content for automatic build Automatic build DieuNT1 VinhNV

3 05/Jun/2019 Update from student feedback Student feedback DieuNT1 VinhNV


Fsoft template

25e-BM/HR/HDCV/FSOFT v1.1 Internal use 2/9


Java SE 8 Programming Language Issue/Revision: 1.1

Contents
Problem 01: Class, Object, Collection, Stream, Filter ............................................................ 6
Specifications: ................................................................................................................... 6
Data Constraint Requirements:.......................................................................................... 6
Functional Requirements ................................................................................................... 6
Estimate time: 60 minutes ................................................................................................. 7
Mark scale : 30% (received partial if not using Java 8) ...................................................... 7
Problem 02: OOP, Collection, JDBC, Exception.................................................................... 8
Specifications: ................................................................................................................... 8
Database Requirements: ................................................................................................... 8
Technical Requirements: ................................................................................................... 8
Functional Requirements: .................................................................................................. 9
User Interface Requirement............................................................................................... 9
Estimate time: 120 minutes ............................................................................................... 9
Mark scale : 70% ............................................................................................................... 9

25e-BM/HR/HDCV/FSOFT v1.1 Internal use 3/9


Java SE 8 Programming Language Issue/Revision: 1.1

CODE: JPL.Practice.T01
TYPE: N/A
LOC: N/A
DURATION: 180 MINUTES

Require 001: Working tools and Delivery requirements

• Working tools: Eclipse IDE for Java


• Delivery: Source code and test results in a compressed archive.
Require 002: Technologies

The product illustrates:


• OOP: Inheritance, Encapsulation, Polymorphims, Abstraction
• String, Java Collection (List, Set, Map)
• Lambda Expressions and Functional Interfaces
• Java I/O Fundamentals
• JDBC: Statement, PreprareStatement, CallableStatement, Batch
• Base Java Knowledge in the course.
Require 003: Technical Requirements

Problem 02 will be developed using the following architecture:

Application Layer
(provides the logic and functionality for our application.) PropertyManager

Domain objects
(represent things in our application domain) get property from

Persistence services ConnectionManager


(handle saving and retrieving data as objects)

• The Application Layer consists of all functions described in the functional requirements
section.
• The domain layer contains objects and logic related to our application. In this layer, you need
to develop all the entity classes corresponding to your tables in database.
• The persistence layer contains data access objects (DAO) that provide services for accessing
persistent data. DAO provide 4 basic services referred to as CRUD:
o Create: save new object data to the database.
o Retrieve: find object data in the database and recreate objects. There may be several
methods for this service to enable different forms of object lookup.
o Update: update data for an object already saved to the database.
o Delete: delete object data from the database
• Each layer should be organized in a separated package.

25e-BM/HR/HDCV/FSOFT v1.1 Internal use 4/9


Java SE 8 Programming Language Issue/Revision: 1.1

Require 004: Technical Requirements

• Use Object-Oriented programming style.


• Follow the standard naming and coding convention.
• Add appropriate comments for each class, method, attribute, …
• Use console application template
• Create a new project and the appropriate packages
• Programming Java with JDBC.

25e-BM/HR/HDCV/FSOFT v1.1 Internal use 5/9


Java SE 8 Programming Language Issue/Revision: 1.1

Create a project named JPL.Practice.T01 to resolve the follow problems:

Problem 01: Class, Object, Collection, Stream, Filter


Specifications:
In the following class hierarchy, the trainee needs to create Java classes to implement entities and their
relationships:

PhoneBook

The PhoneBook class contains the phone book information: name (String), phone number list
(Set<String> phoneNumber), email (String), address (String), group (String), created date
(java.util.Date).

Data Constraint Requirements:


Create the Validator class to check the data as follows:
✓ The Email size is a minimum of 6 characters and follows email format.
✓ The group field accepts one of the following values: "Family", "Colleague", "Friend", "Other”.

✓ The created date takes current date value.

Functional Requirements
Create a new package name fa.training.probelm01 in JPL.Practice.T01 project that contains
following classes:
✓ PhoneBookManagement class has methods as:
public class PhoneBookManagement {
/*
* A collection to store all phone book.
*
*/
private List<PhoneBook> listOfPhoneBook;

/**
* The constructor without parameter.
*/
public PhoneBookManagement() {
listOfPhoneBook = new ArrayList<>();
}
/**
* The constructor with one parameter.
*
* @param listOfPhoneBook
*/
public PhoneBookManagement(List<PhoneBook> listOfPhoneBook) {
super();
this.listOfPhoneBook = listOfPhoneBook;
}
}

25e-BM/HR/HDCV/FSOFT v1.1 Internal use 6/9


Java SE 8 Programming Language Issue/Revision: 1.1

a. A method to input a list of phone book and store it o the ‘listOfPhoneBook’.


The prototype of this methods:
/**
* This method to enter data from keyboard and
* stored to a ‘listOfPhoneBook’.
*/
public void inputData(){
// method body
}

b. Write a method to find phone number list existed in "listOfPhoneBook" by phone book name.
Prototype of this method:
/**
* This method to find phone book by name.
* @param name Pass a specific name.
* @return Return the phone number list if found, else return null.
*/
public Set<String> findByName(String name){
// method body
}

c. The program has a method to delete all existed contact in the collection by group name.
Prototype of this method:
/**
* Delete all existed contact in the phone book.
* @param group
*/
public Boolean deleteByGroup(String group){

d. A method to store the ‘listOfPhoneBook’ into “phonebook.txt” file.


Don't save to this file and return false if ‘listOfPhoneBook’ is null or its size equals 0.
The prototype of above methods:
/**
* This method used to store a ‘listOfPhoneBook’ to the
* phonebook.txt file.
*/
public Boolean save(){

✓ Test class contains the main() method to test all of the above methods of
PhoneBookManagement class.

Estimate time: 60 minutes

Mark scale : 30% (received partial if not using Java 8)

- OO design/Class design: 10 %; - Functional Requirement 60%;


- Data Constraint Requirements: 20%; - Main method: 10%

25e-BM/HR/HDCV/FSOFT v1.1 Internal use 7/9


Java SE 8 Programming Language Issue/Revision: 1.1

Problem 02: OOP, Collection, JDBC, Exception


Specifications:
Students are required to develop a Java console application based on Java core and JDBC
programming knowledge learned from the course to manage Employees (Employee Management
System).

Database Requirements:
Create a new database schema named JPL_TEST01 for this application that contains the table
following:

Contraints:
✓ The to_date must be greater than from_date
✓ The dept_name, first_name, last_name should have a maximum of 50 characters.

Notice that, using default schema is ‘dbo’.

Technical Requirements:
Create a new package named fa.training.problem02 in JPL.Practice.T01 project.
The trainee must create some appropriate sub-package to contain classes in this problem.
E.g
✓ fa.training.problem02.entities to manage entity classes,
✓ fa.training.problem02.dao to manage data access objects,
✓ fa.training.utils to manage the classes that process data constraint requirements, class
utility classes, if need, etc.

25e-BM/HR/HDCV/FSOFT v1.1 Internal use 8/9


Java SE 8 Programming Language Issue/Revision: 1.1

Functional Requirements:
a. Write a function to create a new employee (emp_no, birth_date, first_name, last_name, gender,
hire_date.) in database using a stored procedure (method name save(Employee employee).
b. Write a function to list all the employees in the table, each employee with following information:
emp_no, birth_date, first_name, last_name, gender, hire_date (method name List<Employee>
findAll()).
c. Write a function to update an employee info which includes birth_date, first_name, last_name,
gender, hire_date. This function should use a stored procedure to do its work (method name
update(Employee employee)).
d. Write a function to find an employee by its emp_no. This function should return all the details
(emp_no, birth_date, first_name, last_name, gender, hire_date.) of this employee (method
name findById(emp_no)).
e. Write a function to create a new department in database, using a stored procedure (method
name save(Department department)).
f. Write a function to add the working history of an employee to the Working_History table with
the following info: emp_no, dept_no, from_date, to_date (method name
save(Working_History workingHistory)).
g. Write a function to find all the employees who were working in a department in a period of time,
which is entered from user (method name List<Employee> findByWorkTime(Date fromDate,
Date toDate)).

Note: all the functions you have implemented above must use entity classes, persistence
classes in domain and persistence layers.

User Interface Requirement


The program has a screen console for UI
The main screen allows selecting the functions for:
1. Employee management
a. Add a new Employee
b. Update a specific Employee
c. Find an employee by emp_no
d. Add the working history
e. Find all the employees by working period of time
2. Department management
a. Add a new department
3. Close program

Estimate time: 120 minutes


Mark scale : 70%

- OO design/Class design : 15%; - Functional Requirement : 55%;


Architecture - User Interface Requirement : 15%
- DB Design/Connection : 15%;

--THE END--

25e-BM/HR/HDCV/FSOFT v1.1 Internal use 9/9

You might also like