1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
fiasKO [112]
2 years ago
13

Write a function named “createPurchaseOrder” that accepts the quantity (integer), the cost per item(double), and the description

(string). It will return a newly created PurchaseOrderobject holding that information if they are valid: quantity and cost per item cannot be negative and the description can not be empty or blank(s). When it is invalid, it will return NULL to indicate that it cannot create such PurchaseOrderobject.
Computers and Technology
1 answer:
Leona [35]2 years ago
4 0
#include
Program: using namespace std;
string createPurchaseOrder0;
int main(
{
cout<return 0;
}
string createPurchaseOrder(
{
int qty;
double costPerltem;
string description,info="":
cout<<"Enter Quantity:
cin>>qty;
cout<<"Enter cost per item: "
cin>>costPerltem;
cout<<"Enter Description: "
cin>>description;
if(qty<0 I| costPerltem<0
Idescription.compare(''"')==0)
cout<<'InThe entered data is invalid!":
info="":
else
"
cout<<"'InThe entered data is valid!":
info=info+"'(nQuantity: "+to_string (qty) +" In";
info=info+"Cost per item:
"†to_string (costPerltem)+"In";
info=info+"Description: "description+" In";
return info;

Output:
You might be interested in
Borrowing money affects both assests and owners equity. True or false?​
shtirl [24]
It should be true, hopefully I’m right
6 0
2 years ago
How did The Gates by Christo and Jeanne-Claude affect the site?
Nadusha1986 [10]

Answer:

C. The experience of the park with The Gates was so different that some people saw the park in a new way.

Explanation:

The couple, Christo Javacheff and Jeanne-Claude Denat based in New York were two top contemporary artists who formed collaborative arts.

On the 3rd of January, 2005 they both made an art work known as The Gates, in Central Park.

The experience of the park with "The Gates" was so different that some people saw the park in a new way.

8 0
3 years ago
Read 2 more answers
Besides technical skill, what is the most important factor for staying employed and being offered promotions?
Natali [406]

Obtaining a college degree= while this is nice, you can get a lot of placed with just a GED or Highschool Degree

pursuing self-directed learning=this will help you

showing professional behavior= yes this helps a lot

setting long-term goals= this could help you in the end game

Overall, i think it would be between B and C, though C sounds correct over B because even if you pursue self directed learning, you could still get fired or quit or not get a promotion.

3 0
3 years ago
Read 2 more answers
Hi, please help me, solution.​
loris [4]

Answer:

error: incompatible types

Explanation:

Given

The attached code

Required

The output

Variable "a" is declared as float

While p is declared as a pointer to an integer variable

An error of incompatible types will be returned on line 3, <em>int *p = a;</em>

Because the variables are not the same.

To assign a to p*, we have to use type casting.

Hence, (b) is correct

5 0
3 years ago
True or false :Beyond fulfilling legal obligations, a diverse workplace offers many other benefits as well.
KengaRu [80]
The answer to your question is true.
7 0
3 years ago
Other questions:
  • Helllllp: Virtual private networks require a secure remote connection.<br> True or False?
    10·2 answers
  • The _____ icon allows the user to improve the brightness, contrast, or sharpness of the picture.
    10·1 answer
  • I have been trying to work on this for a while now, and this is on excel
    11·1 answer
  • C++
    8·1 answer
  • William has an internet connection that does not allow him to make calls when connected to the Internet. What internet service c
    8·2 answers
  • In the file MajorSalary, data have been collected from 111 College of Business graduates on their monthly starting salaries. The
    15·1 answer
  • Convert (35.125)10 to binary
    9·1 answer
  • What is ambiguous grammar, explain in maximum 50words.
    5·1 answer
  • What explains the discrepancy between the number of bytes you can
    13·1 answer
  • Write a program that asks the user to enter a positive integer that represents a number in the decimal system and then displays
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!