Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create an IPO chart and write C++ code to solve the following problem. Lab 1: ST

ID: 3539648 • Letter: C

Question

Create an IPO chart and write C++ code to solve the following problem.


Lab 1: STRINGS


The office furniture company in Program 1 wants another program to generate inventory code. They sell office chairs and tables in three colors. All inventory codes consist of 5 characters. If the product is a chair, the first three characters are "C47". If the product is a table, the first three characters are "T47". The last two characters are used to code color: "41" for red, "25" for black" and "30" for green. Write a program to do the following. First ask the user to enter type of product (e.g. "Enter 1 for table or 2 for chair"). Then ask the user to enter color (e.g. "Enter 1 for red, 2 for black or 3 for green"). Generate and display the inventory code based on the information entered by the user. For example, if the user chooses chair and red, the inventory code generated by the program should be "C4741". If the user enters wrong type or wrong color, display "Invalid input".


INPUT

EXPECTED OUTPUT

type: 2, color: 1

inventory code: C4741

INPUT

EXPECTED OUTPUT

type: 2, color: 2

inventory code: C4725

INPUT

EXPECTED OUTPUT

type: 2, color: 3

inventory code: C4730

INPUT

EXPECTED OUTPUT

type: 1, color: 1

inventory code: T4741

INPUT

EXPECTED OUTPUT

type: 1, color: 2

inventory code: T4725

INPUT

EXPECTED OUTPUT

type: 1, color: 3

inventory code: T4730

INPUT

EXPECTED OUTPUT

type: 1, color: 0

"Invalid input"

INPUT

EXPECTED OUTPUT

type: 0, color: 2

"Invalid input"

INPUT

EXPECTED OUTPUT

type: 2, color: 1

inventory code: C4741

Explanation / Answer

hey! I can help you out in this programming question and others if you just add me on skype...my skype id is mohammad.sarmad.junaid...

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote