Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I've been seeing answers using the try and catch method for this problem but I've already started working without that method. I would like an

I've been seeing answers using the try and catch method for this problem but I've already started working without that method. I would like an answer not using the try and catch method to see what I'm doing wrong. Thank you.

image text in transcribed

Problem 1: SalespersonOfTheMonth (file operations, nested loops, 2 d arrays, formatting output) Problem: Four salespeople (numbered 1 to 4 ) sell six different products (numbered 1 to 6 ). Each salesperson passes in a slip for each sale which contains the following information: - the salesperson I.D. number (1,2,3, or 4) - the product number (1,2,3,4,5, or 6) - the total dollar value of that product sold that day. The information from the slips for the last month is available in the file salesSlips.txt . Write a program that will read it and summarize the total sales by salesperson and by product. All totals should be stored in a two-dimensional array, called sales. Cross total each row and column to get the total sales of each product and by each salesperson. Print the results in a tabular format (see example below). Required: - SalespersonOfTheMonth class: when its main method is run produces results below - Include a 2-dimensional array - Include at least one double nested loop - Include printf statement(s) to format your table

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 12th Asian Conference ACIIDS 2020 Phuket Thailand March 23 26 2020 Proceedings

Authors: Pawel Sitek ,Marcin Pietranik ,Marek Krotkiewicz ,Chutimet Srinilta

1st Edition

9811533792, 978-9811533792

More Books

Students also viewed these Databases questions

Question

2. Outline the functions of nonverbal communication

Answered: 1 week ago