Description
Write a Java program to calculate the profit of the East Coast division of a company based on a given percentage of total sales.
Instructions:
- Declare the value 0.62 to represent 62 percent and save it to a variable.
- Save the total sales in a variable.
To start the assignment:
- Open Eclipse IDE and create a new Java project named
Assignment2
. - Add a class named
SalesPrediction
to the project. - Copy the provided program from the document and paste it into Eclipse.
Provided code template:
/*
CS125
Assignment 2
<name>
<your name>
*/
public class SalesPrediction {
public static void main(String[] args) {
// your code
}
} // end of class SalesPrediction
Sample session: “The East Coast division will generate $23200000 if the company makes $40000000 in sales this year (62%).”
Notes:
- The program must compile without syntax errors; otherwise, 50% of the assignment points will be deducted.
- To get full credit, the program must meet the assignment requirements.
- Proper comments are required in the code.
- The beginning of the file should be a block comment containing the student’s name, course, and assignment number.
- Follow the programming style and guidelines discussed in class, including meaningful names for variables and clear code construction.