You are on page 1of 2

Istanbul Medipol University Fall2023 – Assignment #4

School of Engineering and COE 1213250 - Object


Natural Sciences Oriented Programming
Computer Engineering Assignment Date: 30.12.2023
Due Date: 12.01.2023
Programming Assignment #4
Question 1:
In this question, you are going to improve the JavaFX calculator given in page
http://www3.ntu.edu.sg/home/ehchua/programming/java/Javafx1_intro.html

You are going to add additional buttons and functionality that exists in a Windows 10 standard
calculator as follows:

Question 2:
Write a program that prompts the user for a path and displays the directory structure, files and sizes of them on the
console as follows:

+-- file1 202 bytes


+-- file2 500 bytes
+-- begin-dir1
+-- file3 200 bytes
+-- file4 100 bytes
+-- begin-dir2
+-- file5 230 bytes
+-- file6 270 bytes
+-- end-dir2 500 bytes
+-- end-dir1 1000 bytes
+-- file7 350 bytes
+-- begin-dir3
+-- file7 400 bytes
+-- file8 400 bytes
+--end-dir3 800 bytes

Number of Files: 8
Number of Directories: 3
Total Size: 2852 bytes

Hint: Check the recursive program given in page: https://liveexample.pearsoncmg.com/html/DirectorySize.html


Using JavaFX in Eclipse

1. Download an appropriate JavaFX runtime (https://gluonhq.com/products/javafx/)for your


operating system and unzip it to a desired location.
2. File -> Properties -> Java Build Path -> Libraries tab -> Add external jars
select and include all files in the directory that has unzipped files (for example
“C:\Users\selim\Documents\javafx-sdk-11.0.2\lib”)
3. Windows -> Preferences -> Java -> Installed JREs -> Edit
Put --module-path "C:\Users\selim\Documents\javafx-sdk-11.0.2\lib" --add-modules
javafx.controls,javafx.fxml,javafx.graphics,javafx.media in Default VM Arguments. Note that
your JavaFX library location can be different depending on the location that you unzipped.

You might also like