Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Example output; (struct, function and array) using C# language. Write a complete program that can read, process and display the information of 5 books. Your

image text in transcribed

Example output;

image text in transcribed

(struct, function and array) using C# language. Write a complete program that can read, process and display the information of 5 books. Your program will apply array of structure and array as a member I Define a struct named BOOKthat have members explained as follows. Give suitable names for member variables and structure variable The title of the book The price of the book The quantity sold for 4 consecutive years (2017-2020) The total quantity sold (The sum of quantity sold for 4 years) The gross profit (price * total sold) The status(determined based on total quantity sold) cstring double array of int int double cstring Data This function read all data Processo This function calculate the total quantity sold, the gross profit and determine the status based on the following table : Total Quantity Sold Greater 2000 Greater 1000 and less or equal 2000 Less or equal 1000 Status "Bestseller" "Good" "Normal" Display This function display output. Example of output is as follows: Focus AR States 1 Microsoft Visual Studio Debug Console Title Book 1: Round the world in 80 days The Price of Book 1: 35.70 Quantity sold for year 2017 : 200 Quantity sold for year 2018 880 Quantity sold for year 2019: 990 Quantity sold for year 2020 750 Title Book 2: Nemo the Fish The Price of Book 2: 12.50 Quantity sold for year 2017 : 400 Quantity sold for year 2018: 278 Quantity sold for year 2019 : 30 Quantity sold for year 2020 : 660 Title Book 3: C++ Delicous Programming The Price of Book 3: 23.65 Quantity sold for year 2017 : 70 Quantity sold for year 2018 - 95 Quantity sold for year 2019 100 Quantity sold for year 2020 204 Title Book 4: The Sea shell that she sells are sea shore shells The Price of Book 4: 40.40 Quantity sold for year 2017 : 111 Quantity sold for year 2018 : 222 Quantity sold for year 2019: 333 Quantity sold for year 2020 : 444 Title Book 5: The last Blood The Price of Book 5: 69.45 Quantity sold for year 2017 : 20 Quantity sold for year 2018 : 40 Quantity sold for year 2019 : 30 Quantity sold for year 2020 : 10 REPORT 1. Book Title : Round the world in 80 days Status: Bestseller Gross Profit : RM 100674 2. Book Title : Nemo the Fish Status : Good Gross Profit : RM 17100 3. Book Title : C++ Delicous Programming Status : Normal Gross Profit : RM 11091.8 4. Book Title : The Sea shell that she sells are sea shore shells Status : Good Gross Profit : RM 44844 5. Book Title : The last Blood Status : Normal Gross Profit : RM 6945 D: P&P BITG1233 Computer Programming BITG1233 Sem1 2021\C++ Progr am lastass Debug\lastass.exe (process 9140) exited with code 0. Press any key to close this window

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 Design And Implementation

Authors: Shouhong Wang, Hai Wang

1st Edition

1612330150, 978-1612330150

More Books

Students also viewed these Databases questions