Write a C++ program with two classes, import and export, where import consists of items_imp (array of strings) and cost_imp (float) and export consists of items_exp (array of strings) and cost_exp (float). There should be functions in each of these classes which can read these values from the user. In addition, import should have a function which can access an object of export and verifies that the import items are not the same as export and the difference in value of import and export is within +/- 10% of the value of import. A similar mechanism is there for the export class. The program should read all the values and then display "Feasible" when both the conditions are met from both class perspectives. If both conditions are not met, then display "Infeasible". case=1 input=4 //number of export items cotton //export items fish steel sugar 500 //price of export items 5 //number of import items petrol //import items engine laptop mobile television 540 //price of import items Output=Feasible
Write a C++ program with two classes, import and export, where import consists of items_imp (array of strings) and cost_imp (float) and export consists of items_exp (array of strings) and cost_exp (float). There should be functions in each of these classes which can read these values from the user. In addition, import should have a function which can access an object of export and verifies that the import items are not the same as export and the difference in value of import and export is within +/- 10% of the value of import. A similar mechanism is there for the export class. The program should read all the values and then display "Feasible" when both the conditions are met from both class perspectives. If both conditions are not met, then display "Infeasible". case=1 input=4 //number of export items cotton //export items fish steel sugar 500 //price of export items 5 //number of import items petrol //import items engine laptop mobile television 540 //price of import items Output=Feasible
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
C++ code only...
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY