You are on page 1of 4

Trinh Thi Van Anh

Question 1 (3 points)

Design the form might look something like fingue below, named java file is Q1.java

Text or background of textArea changes color


when users select one of 3 colors

Question 2 (4 points)

Create your MS SQL database named PMSDB by running code in script


PMSDB.sql.

Design the form might look something like figure below, named the java file is Main.java

Design form Running form

When users enter value for EmployeeID and click Search button, output information of all Project
Members in Projectmembers table to below table which have EmployeeID contains entered value also
output the number of rows/records found.
Trinh Thi Van Anh

Output a message “Not found any Project member” if the system could not find any matched
Projectmember.

Enter project name: Search (TextField, ComboxBox)

PMDS.sql

create database PMSDB


go
use PMSDB
go
create table Project
(
id int identity(1,1) primary key,
name nvarchar(max) not null
)
go
create table ProjectMember
(
Projectid int references Project(id) not null,
Employeeid nvarchar(20) not null,
IsFullTime bit not null,
[Hours] int not null,
primary key(projectid,employeeid)
)
go
insert into Project values('Sale System Management')
insert into Project values('Hotel System ')
insert into Project values('E-Learning')
insert into Project values('Data Migration')
Trinh Thi Van Anh

go
insert into ProjectMember values(1,'anhttv',1,50)
insert into ProjectMember values(1,'đuyt',1,90)
insert into ProjectMember values(2,'caupd',0,140)
insert into ProjectMember values(3,'hapt',0,30)

Question 3 (3points)
Trinh Thi Van Anh

You might also like