Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For an intro to Java assign. This is what I got so far. Not sure why it keeps sa

ID: 3557813 • Letter: F

Question

For an intro to Java assign. This is what I got so far. Not sure why it keeps saying "input is never closed"

Let me know if I am in the right direction or if you have a different suggestion

----------------------------------------------------------------------------------------------------------------

import java.util.Scanner;

       public class ComputerConfiguration{
           public static void main(String args[]){
               Scanner input = new Scanner(System.in);
               double Budget = input.nextDouble();
               System.out.print("enter budget");
                 
               if (Budget <= 205.99) {
               int Cost;
               Cost = 99;
               double ShippingAndHandling;
               ShippingAndHandling = 7.99;
               double Total;
               Total = ( Cost * 2) + ShippingAndHandling;
              
           System.out.println("The Lenovo ThinkPad laptop satisfies all the needs of a college student.");
           System.out.println("The price also satisfies the budget of a college student");
           System.out.println("Processer - Intel

import java.util.Scanner;

       public class ComputerConfiguration{
           public static void main(String args[]){
               Scanner input = new Scanner(System.in);
               double Budget = input.nextDouble();
               System.out.print("enter budget");
                 
               if (Budget <= 205.99) {
               int Cost;
               Cost = 99;
               double ShippingAndHandling;
               ShippingAndHandling = 7.99;
               double Total;
               Total = ( Cost * 2) + ShippingAndHandling;
              
           System.out.println("The Lenovo ThinkPad laptop satisfies all the needs of a college student.");
           System.out.println("The price also satisfies the budget of a college student");
           System.out.println("Processer - Intel

Explanation / Answer

import java.util.Scanner;
public class ComputerConfiguration{
public static void main(String args[]){
Scanner input = new Scanner(System.in);
           System.out.print("enter budget ");
double Budget = input.nextDouble();

if (Budget <= 205.99) {
int Cost;
Cost = 99;
double ShippingAndHandling;
ShippingAndHandling = 7.99;
double Total;
Total = ( Cost * 2) + ShippingAndHandling;
  
System.out.println("The Lenovo ThinkPad laptop satisfies all the needs of a college student. ");
System.out.println("The price also satisfies the budget of a college student ");
System.out.println("Processer - Intel

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote