0% found this document useful (0 votes)
400 views

JAVA Practice T01

This document outlines two Java programming problems for an exam on Java basics. Problem 1 involves creating classes to manage a list of skills, including initializing the list, getting and removing elements, and updating elements. Problem 2 involves creating a database to store trainee information and classes to perform CRUD operations on trainees, including adding, updating, removing, and retrieving trainees by different criteria. The document specifies requirements for the classes, database, and a menu driver class to test the functionality.

Uploaded by

Huyen Thanh
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)
400 views

JAVA Practice T01

This document outlines two Java programming problems for an exam on Java basics. Problem 1 involves creating classes to manage a list of skills, including initializing the list, getting and removing elements, and updating elements. Problem 2 involves creating a database to store trainee information and classes to perform CRUD operations on trainees, including adding, updating, removing, and retrieving trainees by different criteria. The document specifies requirements for the classes, database, and a menu driver class to test the functionality.

Uploaded by

Huyen Thanh
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/ 6

Java Basics

T ra in in g Ex a m

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

Version 1.1

Effective Date 26/06/2019

Hanoi, 02/2019
Training Exams Java Basics (Automation Test) Issue/Revision: x/y

RECORD OF CHANGES

No Effective Date Change Description Reason Reviewer Approver

1 26/Jun/2019 Createw a new assignment Create new DieuNT1 VinhNV

2 01/Jul/2019 Update: apply fsoft template Update DieuNT1 VinhNV

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


Training Exams Java Basics (Automation Test) Issue/Revision: x/y

Contents
Problem 01: Control-Flow, Collection .............................................................................................................5
Descriptions: ...............................................................................................................................................5
Estimate time ..............................................................................................................................................5
Mark scale ..................................................................................................................................................5
Problem 02: Database Programming, Exception ...........................................................................................5
Specification ...............................................................................................................................................5
Screen Requirements .................................................................................................................................6
Functional Requirement .............................................................................................................................6
Estimate time ..............................................................................................................................................6
Mark scale : 60 points .....................................................................................................................................6

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


Training Exams Java Basics (Automation Test) Issue/Revision: x/y

AT.JAVA.Practice1.T01
Testing date:…………… Allowed time: 150’ Testing score (/10):……….
Account: …………………………………… CODE:
Birth date: …………………………………… AT.JAVA.Practice1.T01

Students are required to develop a Java console application based on Java core and JDBC programming
knowledge learned from the course to manage Trainees in a FA Management System.

Working tools and delivery requirements

 Working tools: Eclipse IDE, SQL Server.

 Delivery: Source code and testing in a compressed archive.

Product architecture

This application 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
(handle saving and retrieving data as objects) ConnectionManager

 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/6


Training Exams Java Basics (Automation Test) Issue/Revision: x/y

Problem 01: Control-Flow, Collection


Descriptions:

Create package problem1.entities that contains SkillList class:

 In constructor with no parameter of SkillList class, initializing an ArrayList contains the following values:
Java, .Net, Android, NodeJS, Angular, AI.

 Create a method named display() to print out all of the elements of the list

 Create a method named getHead(int position) to return specific element from the list. If the parameter
'position' is less than 0 or greater than size-1, or in case the list is null/empty, the method will return a
"NULL" value.

 Remove an element by a specific value, the method named remove(String skill) returns 'true' if the
skill existing and removed it successfully, otherwise returns ‘false’.

 Update an element by index, the method named update(int index, String skillNew).

Create package problem1.management that contains SkillManagment class with main() method to test
above method.

Estimate time: 60 mins

Mark scale: 40 points

- Create package/ Architecture :30% - Functional Requirement : 50%;

- Coding convention (bonus) :10% - Screen Requirement : 20%

Problem 02: Database Programming, Exception


Specification

Create a database named FAS that contains a Trainee table as follows:

In which:

» trainee_id: primary key, auto increment (identity)

» account: trainee account, unique

» gender: trainee gender, only accept value 1: male and 0: female, default null value

» status: trainee status, only accept value ‘active’ and ‘in-active’, default ‘active’ value

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


Training Exams Java Basics (Automation Test) Issue/Revision: x/y

Screen Requirements

1 2

======== FA System ======== ----------Create Trainee -----


1. Create Trainee Enter account:anhnq22
2. Update Trainee Enter name: Nguyen Quang Anh
3. Remove a specific Trainee .....
4. Report incompleted training
5. List excellent trainees
6. Exit
Your choice:
4

------------- Update Trainee ------


Enter account:dieunt1
3 ....
------------ Remove Trainee --------
Enter account: dieunt1

....

Functional Requirement

Create a problem2.entities package that contains above Trainee class.

Create a problem2.dao package that contains a TraineeDao class to perform the functions as follows:

1. Adds a new Trainee with active status into databases (method named: save(Trainee trainee))

2. Updates trainee information of an active specific project by account (method named: update(Trainee
trainee))

3. Remove the trainee that was status is ‘in-active’ (method named: remove())

4. List all incompleted training trainees that the gpa <6 (method named: findIncompletedTrainee())

5. List all excellent trainees consist account, full_name, gender, birth_date, gpa that the gpa between
90 and 100 (method named: findExcellentTrainee())

All exceptions in the TraineeDao class methods must be thrown to the TraineeManagement class for
processing.

Create thes other package named problem2.management, create TraineeManagement class that contains
main() method to provide the menu in Screen Requirements.

Estimate time: 90 mins

Mark scale: 60 points

- Create DB/ Architecture/Connection :20% - Functional Requirements : 50%;

- Coding convention (bonus) :10% - Screen Requirements : 30%

-- THE END --

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

You might also like