Purchase Solution

Java Code & Class File

Not what you're looking for?

Ask Custom Question

Java code with comments and class file

Details: You need to write a program that calculates sales tax and total sale amount. The user should be presented with a menu listing four different products. Based upon their choice, the user enters the quantitly that they desire. The program will then calculate the Subtotal, Sales Tax Amount, and Total Sale Amount. The calculations should be performed as follows:

Subtotal = (Price * Quantity)

Sales Tax Amount = Subtotal * Sales Tax Percentage (sales tax percentage should be 7.5%)

Total Sale Amount = Subtotal + Sales Tax Amount

Be sure to use variables to store temporary values. The program should output the product sold, quantity sold, and the calculated values for Subtotal, Sales Tax Amount, and Total Sale Amount.

Java should be used to write your program. Use NotePad to create your Java program. An IDE (Integrated Development Environment) like NetBeans is not necessary and must not be used. Use the Command Prompt window to compile and execute your code.

Purchase this Solution

Solution Summary

The solution provides a complete executable java program written in Netbeans. The main class is in the build folder. This is the same class file as Main.java, but since this is created by NetBeans, if you open it with either notepad or wordpad it might not show up correctly. Kindly use notepad++ or any other java editor to view the source code with proper format.

Solution Preview

Here is the complete executable java program. The main class is in the build folder. This is the ...

Purchase this Solution


Free BrainMass Quizzes
Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Basic Networking Questions

This quiz consists of some basic networking questions.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Javscript Basics

Quiz on basics of javascript programming language.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.