Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You work as the night manager for a local grocery store chain. One of your dutie

ID: 3708492 • Letter: Y

Question

You work as the night manager for a local grocery store chain. One of your duties includes to go to several store locations at closing time to collect cash and checks on hand at the end of the day. After collecting, you must record how much money (specifically bill denominations) was collected from each store and then calculate the grand total. You currently are counting by hand, using a simple calculator and recording this in a notebook. After being in this SDEV120 course, you know that you can create a program to help you with this nightly task. You know that if this is successful, you can promote this to the other managers as well as other local stores that have chains, so you want to create proper documentation.

Explain or describe the project in your own words.

Discuss what you have achieved since the project was assigned.

Discuss problems that you have encountered since the project was assigned.

Discuss what remaining objectives must be met to complete the project.

Include drafts for the project (for example, in Raptor try attempting to calculate how much money is collected for a single store).

Explanation / Answer

package chegg;
import java.util.Scanner;
public class StoreCollection {
public static void main(String[] args) {
int numberOfStores = 0;
int grandTotal = 0;
int[] store = null;
Scanner scanner = new Scanner(System.in);
System.out
.println(" Enter Number of stroes from where amount needs to be collected");
numberOfStores = scanner.nextInt();
if (numberOfStores > 0) {
store = new int[numberOfStores];
for (int i = 0; i < numberOfStores; i++) {
System.out
.println(" Enter the amount which needs to be collected from store "
+ store[i]);
int collection = scanner.nextInt();
store[i] = collection;
grandTotal = grandTotal + collection;
}
} else {
System.out.println(" No Stores avaibale for collection");
}
System.out.println(" Amount collected from each store is ");
for (int j = 0; j < numberOfStores; j++) {
System.out.println(" Store " + j + " Amount " + store[j]);
}
System.out.println(" Grand Total " + grandTotal);
if (scanner != null) {
scanner.close();
}
}
}

output
-------------
Enter Number of stroes from where amount needs to be collected
3
Enter the amount which needs to be collected from store 0
100
Enter the amount which needs to be collected from store 0
200
Enter the amount which needs to be collected from store 0
300
Collection Amount collected from each store is
Store 0 Amount 100
Store 1 Amount 200
Store 2 Amount 300
Grand Total 600

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote