You are on page 1of 2

Digital Assignment II

Programme : B.Tech Semester : Winter 21-22


Course : Java Programming Code : CSE1007
Faculty : Dr Thomas Abraham Slot(s) : D2+TD2

Question 1

Create a table “VITCourseAvailability” with fields: Campus Name, Programme, Total Seats, Seats Available.
Develop a GUI program with two controls listing the campus name and programme. Based on the campus
name and programme selected display the total seats and seats available is a label. If any seats are available,
enable “Choose Course” button and geta all relevant input from the applicant using appropriate controls. Upon
clicking “Enrol” button, save the student data and campus name and programme opted by the applicant in
another table ‘VITEnrollement2021”. After successful enrolment don’t fotget to update the
VITCourseAvailability table.

Question 2

Assume that you have a text file with several records of four values (acceleration, time, initial velocity
and initial position). Develop a GUI program that computes the distance an object falls in Earth's gravity.
The formula in Math notation is: x(t) = 0.5 × at2 + vit + xi
Your program should have “Read Data” and “Reset” buttons and textfields.. If “Read Data” button is
clicked, read the next record from the file and display the values read from the file in the textfields.
Include a button “Compute Distance” that will print the distance using the above formula. If there are
no records to read disable the “Read Data” button. The “Reset” should be enabled only when “Read Data”
is disabled and upon clicking the “Reset” button, enable the “Read Data”.

Variable Meaning Value


a Acceleration (m/s2) -9.81
t Time (s) 10
vi Initial velocity (m/s) 0
xi Initial position 0
Note: The correct value is -490.5 m. Java will output more digits after the decimal place, but that is
unimportant.

Page 1 of 2
Question 3

Develop a GUI application using JavaFX for updating the Aadhaar card. The aadhaar card update form is
given below.

The * mark indicates those fields are required compulsorily.

For the image, generate a random number between 100000 and 999999.

Upon filling all the details, the user clicks on “Get One Time Password”, which will randomly pick a OTP
from the OTP.dat file and get stored in the local file system in the name “AadharOTP.txt”.

The user then opens the file “AadharOTP.txt” and enter the OTP in Step-2. Till then the “Validate &
Download” button should be disabled. Once the OTP is entered enable the “Validate & Download” button.

If the user clicks on “Validate & Download” button, print a message “Your Aadhar Card Update is noted and
will be processed soon……”

Note: More features and complete documentation will fetch you additional marks.



Page 2 of 2

You might also like