Question: 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.

I've been seeing answers using the try and catch method for this

salesSlips.txt

salesPersonID,product,amount

4,4,11.19

3,2,48.63

2,1,27.5

4,1,7.04

4,5,37.14

1,5,20.3

3,6,10.41

2,6,29.06

3,6,38.56

1,4,6.19

1,1,11.79

2,3,10.94

4,6,6.16

2,2,29.6

3,5,11.09

1,1,5.22

4,6,32.18

1,5,37.28

2,4,49.95

4,6,44.18

3,6,30.63

3,6,2.11

2,1,26.84

1,5,8.63

4,1,23.56

3,4,32.66

2,1,47.69

2,2,8.81

3,1,49.8

1,3,24.59

2,2,49.71

1,3,0.69

3,4,39.82

2,3,12.95

2,3,40.22

4,6,7.49

3,5,10.54

1,5,27.14

4,3,17.44

3,5,31.29

4,3,3.89

2,6,28.78

4,2,8.8

2,2,33.45

2,6,26.7

1,5,11.85

4,5,18.3

3,3,7.77

4,1,32.26

2,4,1.93

1,5,26.82

2,5,31.88

3,4,37.39

4,1,41.35

3,2,18.12

4,4,42.92

2,3,26.78

1,2,27.12

1,4,3.63

3,1,37.57

3,5,39.88

2,5,32.98

4,2,42.27

4,3,0.99

2,4,47.52

4,3,37.57

4,1,17.77

3,4,30.58

3,3,11.54

4,4,46.55

3,2,4.04

3,4,7.14

4,6,36.57

2,5,45.58

3,6,7.27

4,3,48.54

2,5,2.13

1,2,49.85

1,4,16.89

4,1,42.49

4,3,18.37

1,2,38.4

3,3,12.13

4,5,24.15

2,3,25.45

3,5,43.62

3,3,47.46

4,6,36.89

1,1,14.2

2,6,20.85

2,5,2.58

2,5,34.66

1,2,9.17

2,4,42.9

1,6,19.6

3,1,11.24

4,5,5.85

4,4,1.72

2,4,35.67

1,1,0.86

1,5,20.99

3,6,45.24

1,6,9.45

4,1,42

3,3,27.43

1,4,37.81

3,6,48.53

2,6,39.09

1,1,7.86

4,4,16.97

2,5,26.59

2,3,11.7

3,6,1.13

2,3,24.39

2,6,17.31

1,4,5.39

4,5,40.03

2,3,19.2

1,3,47.06

3,3,37

4,4,35.61

1,4,21.2

4,6,42.65

1,5,4.07

4,6,25.98

4,4,3.49

4,1,12.1

1,1,12.15

2,4,44.78

3,3,1.13

1,5,41.84

2,1,34.18

1,3,4.41

1,4,1.31

1,3,13.07

3,1,26.49

1,5,49.37

3,6,48.73

3,2,0.81

1,5,41.04

1,6,39.01

1,6,35.1

1,1,19.83

2,6,18.54

3,1,6.98

3,6,42.07

2,3,0.57

4,6,6.92

1,2,31.44

4,3,6.47

1,1,13.73

1,3,45.25

1,6,28.61

2,4,30.19

4,6,48.34

4,1,15.04

4,1,11.23

3,6,4.81

2,1,7.43

2,4,38.98

1,1,48.94

1,6,9.36

1,6,49.67

2,4,1.3

2,2,0.21

4,6,9.29

1,2,21.62

4,1,29.6

2,1,49.46

4,3,36.14

3,2,35.87

1,3,28.17

3,1,37.82

1,3,7.65

3,1,49.35

1,1,45.57

1,5,25.9

4,6,43.55

4,4,1.14

4,4,47.67

3,6,3.81

4,3,7.45

1,3,4.73

1,4,43.57

3,4,17.88

3,3,28.73

2,3,14.12

2,3,19.97

2,5,6.08

1,2,15.15

2,1,39.41

1,4,17.38

4,2,25.21

2,5,32.02

3,3,22.45

1,6,30.47

1,2,12.29

1,1,35.62

3,2,4.13

3,5,10.63

4,1,24.86

2,3,22.51

3,1,41.56

3,6,29.59

1,2,12.8

4,3,33.47

2,6,44.97

2,2,10.7

1,6,3.52

4,6,32

1,5,12.38

4,4,11.2

1,3,14.33

3,3,43.36

3,5,30.83

3,3,34.83

1,4,31.27

4,5,23.05

4,5,24.41

2,1,38.76

3,5,42.53

4,3,34.94

4,5,35.83

4,5,21.99

2,1,38.05

3,1,15.65

4,3,18.7

3,1,33.21

2,2,6.2

3,5,43.33

3,4,39.61

2,3,23.64

4,6,13.71

4,3,37.1

4,4,24.78

3,3,37.49

3,3,19.23

3,5,41.47

2,3,14.11

3,4,26.78

2,2,18.14

4,4,22.14

4,5,22.78

3,4,10.21

3,2,20.05

2,2,20.68

4,6,8.66

4,5,33.51

2,5,30.57

1,2,12.92

4,5,1.07

3,1,27.1

1,3,33.45

1,2,48.26

2,6,4.5

3,4,18.66

1,2,49.55

4,5,3.17

2,3,14.03

3,4,32.34

1,3,41.28

2,5,39.12

4,6,9.21

1,1,45.74

4,4,27.38

1,3,35.48

3,6,13.71

1,2,46.07

2,2,18.58

1,3,31.04

1,1,37.18

3,5,18.57

4,3,9.26

2,1,42.81

2,2,26.97

3,1,1.9

3,3,6.63

2,4,0.45

4,6,43.93

1,2,18.89

2,5,33.98

4,6,33.81

1,4,33.43

2,2,34.28

1,3,32.55

2,2,25.73

3,2,3.99

3,5,33.94

2,5,13.4

3,2,29.81

3,5,42.91

2,3,49.99

2,1,11.56

3,1,32.46

3,5,33.46

2,2,1.19

4,5,13.06

3,4,14.21

1,6,7.58

4,2,9.66

1,6,22.78

2,1,14.97

1,5,21.23

1,2,9.14

3,4,24.99

4,1,40.42

3,3,24.74

1,5,11.27

1,5,20.43

3,4,16.56

3,2,15.9

1,1,4.38

2,4,38.44

2,4,13.99

1,2,39.82

4,1,40.13

3,2,18.07

3,3,16.96

2,1,39.38

3,4,5.03

4,6,14.65

1,5,44.45

1,4,48.58

2,4,4.63

1,6,43.55

4,3,31.3

2,3,14.33

2,1,29.98

1,1,9.65

1,4,1.86

4,1,36.34

3,5,18.26

1,1,16.97

4,5,35.66

1,2,18.38

3,3,36.81

4,6,38.5

4,4,29.62

4,1,44.96

4,2,3.04

2,4,6.4

2,1,8.27

1,6,38.97

1,5,11.17

1,5,7.4

2,6,35.69

3,1,34.28

1,5,8.68

4,3,29.4

3,4,0.63

1,5,47.48

2,4,28.56

4,6,33.24

2,6,27.28

2,4,46.44

4,5,7.35

2,5,19.58

3,1,15.16

2,4,32.55

4,5,31.61

2,3,28.66

4,6,38.95

4,1,14.64

4,2,15.23

4,6,12.76

2,5,23.08

3,5,46.11

4,1,10.3

4,5,14.81

1,1,31.53

2,5,44.74

2,4,30.73

3,1,46.81

4,2,20.5

2,6,28.88

4,6,30.17

2,2,42.66

3,1,4.93

3,2,45.25

4,5,47.44

2,1,42.15

2,2,42.83

4,1,49.44

2,4,44.12

3,5,29.85

3,3,43.11

3,4,28.48

1,3,16.8

4,6,31.25

1,1,42.44

3,1,47.27

3,3,14.58

1,6,44.97

3,6,33.19

1,1,20.18

4,1,47.04

3,1,31.74

2,5,2.36

3,3,5.17

4,4,10.19

1,4,30.6

2,3,5.25

3,2,32.55

4,4,36.08

4,1,10.78

1,2,13.86

3,4,8.3

1,6,8.16

4,2,48.93

1,5,25.34

2,2,9.78

1,6,2.5

2,3,33.31

4,1,2.6

4,3,36.61

1,3,16.63

3,3,14.84

2,5,40.39

1,3,3.43

3,2,11.12

3,1,15.76

4,3,12.67

1,4,4.17

2,5,6.87

1,3,13.23

4,2,10.71

2,6,38.8

3,3,23.75

1,3,37.68

2,1,15.96

2,3,1.68

3,2,35.74

2,4,35.87

3,6,1.35

2,2,7.75

3,5,18.75

3,1,17.79

1,5,7.54

3,4,42.17

1,1,8.91

2,5,22.07

2,3,41.12

4,1,36.9

4,3,2.33

4,1,23.65

1,1,22.17

1,4,20.86

1,5,2.74

1,5,44.85

1,2,8.06

2,4,36.12

1,4,18.94

3,2,25.19

1,4,40.41

1,3,28.39

3,2,16.23

3,6,11.32

4,3,7.45

4,4,8.51

3,1,21.97

4,6,33.18

4,5,11.88

4,2,41.71

4,4,7.59

1,5,27.92

3,6,13.43

2,1,20.08

3,6,34.75

4,6,41.9

2,3,11.13

2,3,49.48

4,6,32.61

1,5,31.92

3,4,31.8

1,2,10.19

4,4,0.71

1,2,0.83

3,6,24.75

4,6,1.99

3,1,30.87

1,4,12.95

2,3,29.39

3,5,1.9

2,6,39.2

4,6,38.14

4,1,17

2,3,48.89

4,1,20.31

3,2,47.09

2,4,44.44

4,2,34.25

2,6,46.55

1,3,45.45

2,3,28.17

2,4,3.8

4,6,28.87

4,6,36.94

4,5,31.63

4,3,41.04

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!