INF 308 Support de Cours Part2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Java 2

Course material – Part 2


Table of contents

01 02
Reminder GUI event

03 04
JDBC File I/O

05 06
Applet Asynchronous
01
Reminder -
Practice case
Release 1
Create a multiple-choice trivia application
This is a brief reminder of the first releases of your project:

• Create an app that can:

• Read questions, answers, and distractors (wrong answers) from a file

• When a player starts a game

• Choose questions at random;

• Display the answer and distractors in a random order;

• Track the number of correct answers;

• End the game when the player selects a wrong answer.

• Constraints: Write this App using a file database or local data file rather than a key-value store or a
relational database;
02
GUI event
Menu, sub-menu, check, Jpanel,
JLabel, JTextfield, JButton,
Jcheckbox, etc.
Practice case – GUI

From the current project, add the following functionalities:

1. A drop-down menu to choose admin role or not

2. A form to register/login using a variety of items (Jcheckbox, Jlabel,…)

3. Set up a background image

4. Set up a Mute button presented with a sound image


03
JDBC
Java DataBase Connectivity
Practice case – JDBC

From the current project, add the following functionalities:

1. Create a database named ICT308 and the tables to hold user data

2. Create a java class to hold user data

3. Set your game to connect to the database and get/set user data

4. Set your game to hold connected user’s pseudo in a static label

5. Allow the admin-user to add, remove and edit user’s data


04
File I/O
BufferedInputStream,
BufferedOutputStream,
BufferedReader, BufferedWriter
Practice case – File I/O

From the current project, add the following functionalities:

1. Allow user to choose between three levels at the beginning: easy, normal
or hard

2. Each level must have his file

3. The file must be load using buffer’s methods

4. Allow the admin-user to add, remove and edit game’s data


05
Applet
Init, start,
Stop, destroy,
Paint
Local Applet, Remote Applet
Practice case – Applet

From the current project, add the following functionalities:

1. Allow user to rate the app using the web browser


06
Assynchronous
BufferedInputStream,
BufferedOutputStream,
BufferedReader, BufferedWriter
Practice case – Asynchronous

From the current project, add the following functionalities:

1. Introduce sound and video effect of your choing

2. They must be running asynchronously


Thanks!
Do you have any questions?
epamoe@facsciences-uy1.cm

You might also like