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
3. Which major NIMS Component describes systems and methods that help to ensure that incident personnel and other decision maker
mario62 [17]

Answer:

The answer to the following question is Communications & Information management .

Explanation:

National Incident Management System (in short NIMS), is the comprehensive and national approach to how state, tribal, territorial, federal and local responders reacts and responds during the emergency.

The components of NIMS are:

  • Command and Management,
  • Resource Management,
  • Preparedness,
  • Communication & Information,
  • Ongoing Management and Maintenance and
  • Supporting Technologies.
8 0
3 years ago
Why would you copy an individual instead of listing that name on the To line?
kvv77 [185]

When you send a letter or an email to somebody in the course
of your job, you might copy your boss.  Even though he really
doesn't need the information in your correspondence, and you
don't expect him to answer you or take any action, you still want
him to know that you're doing your job, and how you're handling
this matter, and you want him to have the information available
IF he wants to see it.

3 0
3 years ago
Read 2 more answers
What lets you change the order of events in a game?
IRISSAK [1]
B the story board editor.
8 0
3 years ago
what do we know about the contents of the arrays left and right with respect to what objects (integers) they contain in general
KIM [24]

A "divide and conquer" approach known as binary search necessitates sorting the starting array first. Because the technique divides the array into two equal halves, it is called a binary algorithm. A binary search will initially examine the middle item in the array and evaluate it in relation to the search terms.

<h3>What exactly is binary search?</h3>
  • Finding an element's location in a sorted array can be done using the searching method known as binary search.
  • With this method, an array's middle is always searched for the element. Only on a list of things that has been sorted can binary search be used. If the elements are not sorted already, we need to sort them first.
  • Binary search is used to find values in any sorted collection from any language library, including Java,.NET, C++ STL, etc.
  • A sorted array can be searched using the binary search algorithm by continually halving the search interval. Utilizing the knowledge that the array is sorted, binary search attempts to minimize the time complexity to O (Log n).

To Learn more about binary search refer:

brainly.com/question/21475482

#SPJ4

3 0
1 year ago
Purpose of this program:
WARRIOR [948]

Answer:

Solved. Please download the attached zipped file. You can download the answers from the given link in explanation section

Explanation:

Download the attached file and unzipped/extract it to the root folder of your server.

This package contains all the files and folders as asked in the project.

In this package you can find the 5 pages in the includes folder and at the root you can find the index file. Click on the index file to open it.

Each page is stylized and have uniqueness than other pages. Please also note that, each page contains first, last and initial name in the title section of each page and in body section of each page. You can modify these names parameter according to your name/requirement

https://drive.google.com/file/d/1OBdjUI6JOnUuji-iYPmPWnJBk4gcMd6X/view?usp=sharing

6 0
3 years ago
Other questions:
  • Emma wants to create a web page for her school’s volleyball team. Which of these could she use?
    7·1 answer
  • 1) If a client requests timestamping every two minutes, how would it look? a) [00:02:00] b) [00:06:00] c) (00:04:00)
    15·2 answers
  • Ryan has created a Word document to be used as a review quiz for students in a classroom setting. The document contains both que
    6·1 answer
  • 1.) How do parks and other green spaces benefit a community?
    7·2 answers
  • 3. The invention of the transistor was important to the development of computers because it
    5·1 answer
  • Declare an array named tax rates of five elements of type double and initialize the elements (starting with the first) to the va
    12·1 answer
  • "background" software that helps the computer manage its own internal resources is called ________.
    5·1 answer
  • Write a program and flowchart. The program should ask the user for the average temperature in each of the last 12 months. After
    14·1 answer
  • Define computer memory and write its type <br>​
    10·2 answers
  • true or false hardware diagnostics let you run a quick check of system hardware and can verify that most systems components are
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!