Following is my java program that i need help with.
Write a program that uses a JavaFX GUI that allows a user to enter a directory (folder) and then displays the number of the files in the directory. The number of files in the directory should be determined recursively.
import java.io.File;
import java.io.IOException;
import java.util.Scanner;
public class Main{
public static void main(String args[]) throws IOException{
System.out.println("enter the path to folder to search for file");
Scanner sl=new Scanner(System.in);
String folderPath=sl.next();
File folder=new FIle(folderPath);
if(folder.isDirectory()){
File[] listOfFiles=folder.listFiles();
if(listOfFiles.length < 1)
System.out.println("there is no file inside the folder");
else
System.out.println("List of files & Folder");
for(File file:listOfFiles){
if(!file.isDirectory())
System.out.println(file.getCanonicalPath().toString());
}
}
else
System.out.println("there is no folder in given path :"+folderPath);
}
}
Following is my java program that i need help with. Write a program that uses a...
.Need code for my java class !! Write a simple java program that uses loops. You may use ‘WHILE’ or ‘FOR’ or ‘DO-WHILE’ – you decide. The program should use a loop to compute the semester average for up to 5 students. In the loop the user will ask for a student name and their 3 test scores and add them up and divide the total by 3 giving the semester average. You will print out the student name and...
Write a java program that uses a loop to input, from the user not using gui, a collection of values that are the number of steps taken each day for a sequence of days and stores those amounts in an array. the array length should be 31, The user is not required to enter 31 values. the program determines and displays the largest number of steps for a single day, the smallest number of steps for a single day and...
I need help with the following. I need to write a program code in Java using NetBeans. It is from How to Program Java book Chapter 2. This program should calculate the packing of Candles. First read: The number of candles The number of candles that fit in each case Then calculate and print: The number of full cases The number of candles left over (partial case) If this order is large (more than 5 full cases needed) An extra...
I need help to write a program in Java. If a moderately active person cuts their calorie intake by 500 calories a day, they can typically lose about 4 pounds a month. Write a program that lets the user enter their starting weight, then creates and displays a table showing what their expected weight will be at the end of each month for the next 6 months if they stay on this diet.
PARTI: Getting Number of Files in a Directory Problem Description: Write a program that prompts the user to enter a directory and displays the number of the files in the directory. Write a program that prompts the user to enter a directory name and creates a directory using the File’s mkdirs method. The program displays the message “Directory created successfully” if a directory is created or “Directory already exists” if the directory already exists.
Write the program in Java. Description: Write a program to calculate the total size of all files in the current directory / folder and all sub-folders. Example: I have a directory with 1 file (size 150KB) and 2 subdirectories, each of which has 1 file (size 10KB each), then when I run this program on this directory, I expect the answer to be 170KB.
Write a javafx GUI program that uses a TextField to allow the user to enter a string. When the user presses return, have the action handler for the TextField count the number of vowels (a, e, i, o, u, y) in the string. Use a switch statement for this rather that if statements. Write out the number of vowels in a Label. Case does not matter for the vowels.
Need help on following Java GUI problem: Write a program that lets a user display and modify pictures. Create a window. Add four buttons so that clicking a particular button will shift the image by a small amount in the north, south, east or west direction inside the window. Add a menu bar with two menus: File and Image. The File menu should contain an Open menu item that the user can select to display JPEG and PNG files from...
Hi,
Hi,
I need someone to write a program in Phython 3.6, and please I
will appreciate if the code is error free and indented correctly.
The output would be preferable.
thanks
Write a GUI program that translates the Latin words to English. The window should have three buttons, one for each Latin word. When the user clicks a button, the program displays the English translation in a label. 3. Miles Per Gallon Calculator Write a GUI program that calculates...
Hi, I need help with this Java GUI program. The instruction and code can be found below thanks. This GUI is the start of a simple number entry GUI class. The program displays four Buttons and every time the user clicks on a button, the corresponding button label appears on the bottom of the GUI. As a hint, you might break up the design of the GUI into two parts: one part holds the buttons, the other holds the completed...