Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The file named Product Info.txt includes information about products sold at a home improvement store. Each row of information represents a transaction from a unique

image text in transcribed

The file named Product Info.txt includes information about products sold at a home improvement store. Each row of information represents a transaction from a unique customer. The first element of a row is the name of the product sold, the second is the price of the product and the third is the number of that product sold during the transaction. Note that you may not use arrays on this assignment. a. Create a directory in your IntelliJ project folder named input_data and place the Product Info.txt file in that directory. b. Create a class named H3_Q3.java and write code that reads the data from the file (hint: perhaps more than once) and determines the following: 1. How many unique customers purchased each item? 2. How much total revenue did the store make on each item in the file? Note that you may assume that only the following products are in the file: Saw, Table, Flashlight, Battery and Clamp. c. Create an output .txt file named Q3cOutput.txt in the output_files directory that prints a summary table with the following format. Toal Revenue Product Name Unique Customers Saw XXXX Table XXXX Flashlight XXXX Battery XXXX Clamp XXXX YYYY YYYY YYYY YYYY YYYY Specific alignment of each element in the table is not necessary, nor are the lines separating the rows. However, column headings should be included. Also, XXXX should be formatted as US Currency ($XX.XX). 2 Product Price Saw 8.56 Table 45 Table 45 Flashlight Battery 3.33 clamp 6 Flashlight Battery 3.33 Table 45 Flashlight Battery 3.33 Clamp 6 Saw 8.56 Table 45 Amount 1 1 1 5.25 4 1 5.25 1 1 5.25 2 1 2 1 1 1

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

Step: 3

blur-text-image

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

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

Describe Balor method and give the chemical reaction.

Answered: 1 week ago

Question

How to prepare washing soda from common salt?

Answered: 1 week ago

Question

4. Help trainees set challenging mastery or learning goals.

Answered: 1 week ago

Question

2. Enrolling employees in courses and programs.

Answered: 1 week ago