•A non-GUI based Java application that fulfills the requirements listed below. All output should be to the console/standard output. •Salespersons for Big State Books receive a commission of ten percent for each sale. In addition, the salesperson earns a 99 dollar bonus for each sales. •Write a program that prompts the salesperson for the name of the customer and the price of the textbooks sold to that customer. •The program should display the customer’s name and the total compensation (commission plus bonus) for the sale. •All input should be from the keyboard using the Scanner class. •There should be proper documentation in the source code. The documentation should include a block containing the name of the program and the name of the student, and a short description of the program. There should be comments for each line of code. •The .java source code files with the correct file names for all classes used. The program must consist of at least one public class. •Programs are expected to compile and run/execute correctly.

The task at hand is to create a non-GUI based Java application that prompts a salesperson for the name of a customer and the price of the textbooks sold to that customer. The program should then display the customer’s name and the total compensation for the sale.

To fulfill this requirement, we will create a Java application that utilizes the Scanner class to receive input from the keyboard. The program will calculate the commission, bonus, and total compensation based on the price of the textbooks sold. The commission will be ten percent of the price, while the bonus will be a fixed amount of 99 dollars.

It is important to note that proper documentation is required in the source code. This documentation should include a block containing the program’s name and the name of the student, as well as a brief description of the program. Additionally, each line of code should be commented to provide clarity and understanding.

The program must consist of at least one public class and should have the correct file names for all classes used. It should compile and execute without any errors.

Let’s start by creating the main class for our Java application. We will name it “SalesCalculator”. The code snippet below shows the initial structure of this class with the required documentation:

“`java
/**
* SalesCalculator.java
* Author: [Your Name]
* Description: This program prompts a salesperson for the name of a customer and the price of the textbooks sold to that customer.
* It calculates and displays the customer’s name and the total compensation for the sale, including commission and bonus.
*/

import java.util.Scanner;

public class SalesCalculator {
public static void main(String[] args) {
// TODO: Implement the program logic here
}
}
“`

In the `main` method, we have a TODO comment indicating that we need to implement the program’s logic. This is where we will prompt the salesperson for input, perform the necessary calculations, and display the output.

To prompt the salesperson for input, we will use the `Scanner` class. We can create an instance of the `Scanner` class and use its methods to receive input from the keyboard.

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Click Here to Make an Order Click Here to Hire a Writer