, j'ai un exercice a faire pour la semaine prochaine et je suis completement perdu ...
Il faut ecrire un java code programme pour que cela fonctionne comme le starter programme d'en bas .
Feuille donnee par le prof .
--------------------------------------------------
----------
import java.util.Scanner;
import java.text.NumberFormat;
public class PaintersHelper {
static float DOOR_SIZE = 15.0f;
static float SMALL_WINDOW_SIZE =2.0f;
static float LARGE_WINDOW_SIZE = 5.0f;
static float SQ_FT_PER_GALLON = 375.0f;
public static void main(String[] args) {
// declare all variables to be used (I provide a couple to get you started.)
float gallons = 0.0f;
NumberFormat nf = NumberFormat.getNumberInstance();
// give welcome and instructions to user
// prompt user for the room's width
// prompt user for the room's length
// prompt user for the room's height
// prompt user for the number of doors
// prompt user for the number of small windows
// prompt user for the number of large windows
// gross square feet = height * 2 * (length + width)
// subtractions is the sum of:
// number of doors * door size
// number of lgWindows * lgWindow size
// number of smWindows * smWindow size
// net square feet = gross square feet - subtractions
// gallons = netSqFt / SQ_FT_PER_GALLON rounded to the nearest tenth of a gallon
// display the answer.
System.out.println("\nYou will need about " + nf.format(gallons) + " gallons of paint.");
Scanner sc = new Scanner(System.in);
System.out.println("Hit any key (except space or Enter) + 'Enter' to quit.");
String throwAway = sc.next();
} // end of method main
} // end of class PaintersHelper
Pour votre aide .