So this is going to sound like other posts but I have been racking my brain to figure this out. This code is a mod of one that my instructor posted, he said it was fine to just change the names of variables and submit it. When I did so and compiled it I received the attached error message.
Here is the code and I will italicize the line in question since line numbers are not visible. Thank You in advance!!!
import java.util.Scanner;
public class Software
{
public static void main ( String args [] )
{
String softwareName;
double softwareLocation;
double softwarePrice;
double softwareQuantity;
Scanner input = new Scanner ( System.in );
System.out.printf("\nSoftware Name :");
softwareName = input.nextLine();
if (!(softwareName.equals("stop")))
do {
Scanner input2 = new Scanner ( System.in );
System.out.printf("\nPlease give software price use format 999.99: ");
softwarePrice = input.nextDouble();
{
System.out.printf("\n\n**********Please use positive numbers*****\n\n");
System.out.printf("\nPlease give software price use format 999.99: ");
softwarePrice = input.nextDouble();
}
System.out.printf("\nPlease give software location use format 999.99: ");
softwareLocation = input.nextDouble();
while (softwareLocation<0)
{
System.out.printf("\n\n**********Please use positive numbers*****\n\n");
System.out.printf("\nPlease give software location use format 999.99: ");
softwareLocation= input.nextDouble();
}
softwareinfo software = new softwareinfo(softwareName, softwareLocation, softwarePrice);
System.out.printf("\nSoftware Name:%s",software.getSoftwareName());
System.out.printf("\nSoftware Location:%.2f",software.getSoftwareLocation());
System.out.printf("\nSoftware Price:$%.2f",software.getSoftwarePrice());
System.out.printf("\nSoftware Quantity:$%.2f",software.getSoftwareQuantity());
System.out.printf("\n\nEnter Software Name or to stop :");
softwareName = input2.nextLine();
}while (!(softwareName.equals("stop")));
}
}