0% found this document useful (0 votes)
29 views1 page

Independent University, Bangladesh: CSE213/CSC305: Object Oriented Programming - I Class Test - 3, Section 2

The document provides instructions for a class test involving creating an FXML application with a file menu containing options to create a new text file and show employees from a file to the console. It describes capturing employee data from text fields and adding it to a table view, then writing the data to a binary file. It also describes reading employee objects from a saved binary file, displaying the information to the console, and showing department-wise student counts.

Uploaded by

Rafi Khan
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)
29 views1 page

Independent University, Bangladesh: CSE213/CSC305: Object Oriented Programming - I Class Test - 3, Section 2

The document provides instructions for a class test involving creating an FXML application with a file menu containing options to create a new text file and show employees from a file to the console. It describes capturing employee data from text fields and adding it to a table view, then writing the data to a binary file. It also describes reading employee objects from a saved binary file, displaying the information to the console, and showing department-wise student counts.

Uploaded by

Rafi Khan
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/ 1

31 July 2019

Independent University, Bangladesh


CSE213/CSC305: Object Oriented Programming – I
Class Test – 3, Section 2

Total marks: 20; Duration 1 hour

Implement and run the following FXML application:

1) There will be a "File" menu with following menu items:


- "Create New text file"
- "Show Employees from file to console"

2) "createNewTextFileMenuItemOnClick(…)" controller method will load the scene-parent of


”CreateNewFileFXML.fxml” into the center area of main BorderLayout (called “mainBorderLayout”) of
“MainFXML.fxml” where you will capture the following:
a) Employee id (TextField fxid: idTextField, Employee class field: int id)
b) Employee name (TextField fxid: nameTextField, Employee class field: String name)
c) Gender (RadioButton fxids: maleRB, femaleRB, transGenderRB; Employee class field: String
gender)
d) Department (ComboBox fxid: deptComboBox, Employee class field: String dept)
e) The center area will also have an “Add” button, clicking which will add an Employee instance from the
captured data as a row to a TableView (empTableView). Another button of center area called “Save”
will invoke a file chooser “fcSave” for the (to be created) new binary file name. On confirming the
“Save” option, you need to APPEND all the rows from empTableView into the binary file selected in
file chooser (using writeObject() method).
f) When you add a row to empTableView, a Label (deptCountLabel) must be updated having new
student count for all departments.

3) " ShowEmployeesMenuItemOnClick(…)" controller method will invoke a file chooser “fcOpen” to select the
previously saved binary file. On confirming the “Open” option, you need to read all the objects from the binary
file and show each employee info on separate lines at console, and the output format should be as follows:
Id = xxxxx, Name = xxxxx, Gender = xxxxx, Dept = xxxx
Id = yyyyy, Name = yyyyy, Gender = yyyyy, Dept = yyyyy
Id = zzzzz, Name = zzzzz, Gender = zzzzz, Dept = zzzzz
… and so on…
It will ALSO show department wise student count as follows:
Total student of CSE dept = xx
Total student of EEE dept = yy
Total student of PS dept = zz
… and so on…

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy