Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

An electronic store wants to keep an inventory of the products in its store. You are asked to write a program that asks the user

An electronic store wants to keep an inventory of the products in its store. You are

asked to write a program that asks the user to enter the brand (string, eg. Elba), serial

number (string, eg. ELB102), type (string, eg. kettle), warranty period (int) and the price

(double) for each product. The user can enter as many product's information as needed

(use a loop of your choice).

An electronic store wants to keep an inventory of the product in its store. Update the program from Assignment 1 using struct that represents the Product with the data; the brand (string, eg. Elba), serial number (string, eg. ELB102), type (string, eg. kettle), warranty period (int) and the price (double) for each product. The user can enter as many products information as needed (use a loop of your choice).

The program should do the following:

1. Identify the total and average price of all products in the inventory.

2. Display the brand and model of the most expensive product.

3.How many kettles are in the inventory?

Requires :

variables, data types

basic input/output

logic (if else if statements)

loops (for, while, or do-while. Hint : data has to be processed within the loop)

1.Identify the total and average price of all product.

2.Display the brand and serial number of the most expensive product.

3.How many kettles of type ELBA are in the inventory.

Requires :

Struct

input/output related to struct

logic (selection structure)

loops (for, while, or do-while.)

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

Database And Expert Systems Applications 23rd International Conference Dexa 2012 Vienna Austria September 2012 Proceedings Part 1 Lncs 7446

Authors: Stephen W. Liddle ,Klaus-Dieter Schewe ,A Min Tjoa ,Xiaofang Zhou

2012th Edition

3642325998, 978-3642325991

More Books

Students also viewed these Databases questions

Question

What are the key steps in diagnosing a conflict situation?

Answered: 1 week ago