Without break; statements, the switch "falls through" to the next case. So the code is directed to case 3, which sets total to 10. Then another 3 gets added and another 6, because cases 4 and 8 are also executed. That brings the total to 19.
So, always use a compile rule or code checker that checks your code for missing breaks, because it is hardly ever what you want on purpose.
Based on the scenario being described within the question it can be said that the most likely cause for this poor performance is Extended Rate Physical OFDM. This is a technology that increases the bandwidth of 802.11 radio signals. Unfortunately this is also causing those radio signals from the bar-code scanners to increase their bandwidth and interfere with your notebooks performance.
// here is pseudo-code and implementation in java.
// class definition
// main method of the class
public static void main (String args) throws java.lang.Exception
// scanner object to read innput
Scanner s=new Scanner(System.in);
System.out.print("Please enter cost of item:");
//read the cost of item
// calculate 10% tax on the item
// print original cost
System.out.println("original cost of item is: "+item_cost);
// print tax on the item
System.out.println("tax on the item is: "+tax);
// print total cost of item
System.out.println("total cost of item is:"+(item_cost+tax));
Read the original cost of item from user and assign it to variable "item_cost". Calculate 10% tax on the cost of item and assign it to variable "tax".Print the original cost and tax on item.Then add the cost and tax, this will be the total cost of item and print it.