Write a program that will simulate a change machine found at cash registers. Input the amount due and amount paid from the keyboard. Tell the user how much change is owed and number of quarters, dimes, nickels, and pennies in change a customer would receive. Pay special attention to roundoff error. Your program should use division and modular division. No if’s or loops may be used. You may assume all change will be between $0 and $.99 Hint: Modular division is a great way to find the remainder of a division. Think about how you can use this to calculate the change that is left over after some coins are given.

Answers

Answer 1

Answer:

amount_due = float(input("Enter amount due: "))

amount_paid = float(input("Enter amount paid: "))

change = amount_paid - amount_due

pennies = change * 100

quarters = int(pennies / 25)

pennies %= 25

dimes = int(pennies / 10)

pennies %= 10

nickels = int(pennies / 5)

pennies %= 5

pennies = int(pennies)

print("Your change is $%.2f" % change)

print("Quarters: " + str(quarters) + ", Dimes: " + str(dimes) + ", Nickels: " + str(nickels) + ", Pennies: " + str(pennies))

Explanation:

*The code is in Python.

Ask the user to enter amount due and amount paid

Calculate the change

Convert change to pennies

Find the number of  quarters, dimes, nickels in the pennies using division and modular operator. The remaining amount equals the number of pennies

Print the change

Print the number of quarters, dimes, nickels, and pennies

Let me demonstrate calculating the quarters:

Let's say pennies equals 39,

quarters = int(pennies / 25) → int(39/35) → int(1.11) = 1

pennies %= 25 (same as pennies = pennies % 25) → 39 % 25 → 14


Related Questions

The question: A computer has 8 GByte of memory with 64-bit addressable word sizes. Each block of memory stores 16 words. The computer has a direct-mapping cache of 128 blocks

1. Calculate the tag bits, Line number bits, and offset bit.


To solve the question, here is what I did.
8GB = 1GW (64 bit word = 8 bytes/word), which requires 30 bits (log 2 1G = 30). The memory address is divided into line number and word number. With 16 words per line, we need 4 bits for the block offset. Next, since block stores 16 words, there must be 16 lines in cache to store 128 blocks so line number bits 4 (log 2 16 = 4) and then or tag bits 30 - 4 - 4 = 22 bits for tag bits.

Please tell me if this is correct or not? If not, provide solution.

On an unrelated note, to get Tag bits is this formula valid? log 2 (main memory size / cache size).

Answers

Answer:

Your solution is correct.

To calculate the number of tag bits, we use the formula: number of tag bits = total number of bits - number of offset bits - number of index bits.

In this case, the total number of bits is 64 (since we have 64-bit addressable word sizes). We have 8GB of memory, which requires 30 bits (since 2^30 = 1GB). We have 16 words per block, so we need 4 bits for the offset. We have 128 blocks in the cache, which requires 7 bits for the index (since log2(128) = 7).

Therefore, the number of tag bits is: 64 - 4 - 7 = 53.

So, the tag bits are 53 bits, the line number bits are 4 bits, and the offset bits are 4 bits.

Regarding your unrelated note, the formula log2(main memory size / cache size) is used to calculate the number of index bits for a set-associative cache. It is not used to calculate the number of tag bits.

Problem 3: One fallacy students and researchers often make is expecting to improve the overall performance of a computer just by improving only one aspect of the computer. Instructions are classified as: Integer, Floating Point, Load/Store, Branch, in this fictitious processor. Consider a computer running a program that requires 250s, with 80s spent executing Floating Point (FP) instructions, 60s executed Load/Store instructions, and 50s spent executing branch instructions.
a. By how much is the total time reduced if the time for the FP operations is reduced by 20%?
b. By how much is the time for integer (INT) operations reduced if the total time is reduced by 20%?
c. Can the total time be reduced by 20% by reducing only the time for the branch instructions?

Answers

a. 16s, b. 24s, c. No, the time for branch instructions is only 50s, so reducing it alone by 20% would only reduce the total time by 10%.

a. The total time is reduced by 16 seconds when the time for the FP operations is reduced by 20%, calculated as (800.2)=16.

b. The time for integer operations is reduced by 40 seconds when the total time is reduced by 20%, calculated as (2500.2)*(1-((80+60+50)/250))=40.

c.No, cutting solely the time for the branch instructions won't result in a 20% reduction in overall time. The time for the branch instructions is already the smallest component, so reducing it will not have a significant impact on the overall performance.

In other words, improving the performance of only one aspect of the computer may not necessarily lead to an overall improvement in performance, as the program's execution time is affected by several types of instructions, and optimizing one instruction type may not necessarily result in an equal overall performance improvement. Therefore, it is important to consider all aspects of the computer and their interactions when attempting to improve overall performance.

Learn more about branch instructions here:

https://brainly.com/question/19529731

#SPJ4

Haley is responsible for checking the web server utilization. Which things should she review while checking the server utilization?

While checking the server utilizations, she should review____ and ____.

First box?
CPU
cables
backup media

Second box?
RAM
web application
antivirus

Answers

Answer:

While checking the server utilizations, she should review CPU and RAM.

Explanation:

Answer:

CPU and RAM

Explanation:

What is your work solutions?

Answers

Answer:

Explanation:

< xlink:href="https://www.worktime.com/employee-time-tracking-software">employee tracking</link> worktime solutions is the best!

what is a computer modem?​

Answers

Answer:

A modem modulates and demodulates electrical signals sent through phone lines, coaxial cables, or other types of wiring.

what is the symbol for population mean

Answers

The symbol for population mean is μ (mu).

The symbol μ (mu) is used to represent the population mean in statistics. The population mean is a measure of central tendency that represents the average value of a variable in the entire population.

It is calculated by summing up all the values in the population and dividing by the total number of observations.

The use of the Greek letter μ as the symbol for population mean is a convention in statistics. It helps to distinguish the population mean from other measures of central tendency, such as the sample mean .

The population mean provides valuable information about the average value of a variable in the entire population, which can be useful for making inferences and drawing conclusions about the population as a whole.

The population mean is a useful statistic because it provides a single value that summarizes the central tendency of the variable in the population. It helps researchers and statisticians understand the typical or average value of the variable and make comparisons or draw inferences about the population as a whole.

It's important to note that the population mean is based on data from the entire population, which is often not feasible or practical to obtain in many cases. In such situations, researchers often rely on samples to estimate the population mean.

For more questions on population

https://brainly.com/question/30396931

#SPJ11

What type of projects can I find in Workana?
A) Free projects
B) Paid projects in which I can charge per hour worked or by finished project
C) Projects paid by commission
D) Projects in which I can partner with other users and share profits
E) All of the above

Answers

Answer:

E

Explanation:

When you are looking for projects at Workana or post a project, you can work o post a project for a fixed price or hourly.

Let's see the differences

Fixed Price:

Fixed prices are the projects that are well defined with the reach and job structure and the payment will be realized once at the end of the job. The customer and professional agreed price before starting working on the project. It's important to measure the specific goals for both sides. As soon as the job goes on, some deliverables will define the progress of the job. It's crucial to keep clear the reach, time and deliverables before starting work on the project. In this way, you can avoid miscommunication.

On the other hand, if it is not clear what is expected on the project that you applying for,  some changes are suddenly expected on the project that you are already working on, or even if you must dedicate a large part of your week/month in this project, then it is recommended that you be hired in a more flexible way.

Projects by Hour

In these cases above the best choice are jobs by hour. Both customer and professional agreed on a price per hour and starts working on the project reporting the hours that were worked on through Workana.

Customers can accept or reject the report and have perfect control over the job that is being realized. Also, it can limit the authorized hours that a professional can work on his project. Doesn't matter if the job is a fixed price or per hour, be sure that all is well accorded and the objectives are clear to achieve success for both sides.

As both agree before starting, less misunderstanding they will have.

Remember that fixed-price projects always have Workana's guarantee.

And the guarantee on projects by the hour is valid only if the hours are registered by Workana Time Report.

The money will be released only when the project is totally finished according to the initial deal.

Please help me, I need to turn this in before 12am. :(

Take a few moments and ask yourself about the value of a database. Then develop no less than two paragraphs considering... What can they really accomplish? Can you think of any industries that are actively using them? Are they challenging to learn? (or any other information you feel is prudent to the discussion).

Answers

Databases are essential tools for storing, organizing, and managing large amounts of data, providing valuable insights and serving as a foundation for software systems across industries.

Write a short note on databases and their uses.

Databases are an essential tool for storing, organizing, and managing large amounts of data. They allow for efficient retrieval and manipulation of data and can provide valuable insights for businesses and organizations.

In today's data-driven world, databases can accomplish a wide range of tasks. They can store customer information, inventory data, financial records, and more. Databases can be used for analysis and decision-making, such as identifying trends, forecasting future performance, and optimizing operations. They can also provide a foundation for applications and software systems, such as e-commerce platforms, CRM systems, and inventory management software.

Many industries actively use databases, including healthcare, finance, retail, and government. Healthcare organizations use databases to manage patient records and medical information, while financial institutions use them to manage transactions and account information. Retail companies use databases to track inventory and sales data, while government agencies use them to manage citizen records and public services.

While databases can be complex and challenging to learn, there are many resources available to help individuals and organizations develop the skills needed to use them effectively. Online courses, tutorials, and certifications are available, as well as consulting and support services from database vendors and experts. With the right training and resources, anyone can learn to use databases to their full potential.

To learn more about Databases, visit:

https://brainly.com/question/6447559

#SPJ1

what type of elictrical service is there in your area? 2 wire or 3 wire​

Answers

Answer:

3 wire and 5 wire!

Explanation:

We have 3 wire connections, having Live, Neutral and Ground, but also 5 wire connections, having 3 phases, Neutral and Ground.

Explanation:

3 wire is what we have here

a personal statement should be submitted

Answers

Answer:

Prospective employers and universities may ask for a personal statement that details your qualifications for a position or degree program. Writing a compelling personal statement is an excellent way to highlight your skills and goals to an employer or university.

Yes, submitting a personal statement is often required or advised when applying for specific academic programs, scholarships, or jobs.

A person's background, experience, objectives and motivations can all be expressed in a personal statement, which is a written declaration. This gives the applicant a chance to highlight personal successes, abilities and characteristics that make them an excellent contender for the position they are pursuing.

A well-written personal statement can help tell a compelling story and make a good impression on the hiring manager or committee. It is important to follow closely any instructions or prompts given and to adjust individual details to the particular needs of the application.

Learn more about personal statement, here:

https://brainly.com/question/3660905

#SPJ1

Should one own a smart home device

What are some security issues that one can find bothersome with these types of devices?

Answers

Yes, one can have or should one own a smart home device

Some security issues that one can find bothersome with these types of devices are:

Privacy concernsVulnerabilities to hackingLack of updatesWhat are the  security issues?

Smart home tools offer usefulness and can help create growth easier, but they further create freedom risks that should be deliberate.

Some freedom issues so that find bothersome accompanying smart home tools contain:

Lastly, in terms of Privacy concerns: Smart home ploys may accumulate individual dossier, such as custom patterns and choices, that could be joint accompanying after second-party parties for point or direct at a goal buildup or added purposes.

Learn more about  security issues  from

https://brainly.com/question/29477357

#SPJ1

PBL projects are graded using what it tells you what you are doing very well and where you may need improvements

Answers

Answer: a rubric

Explanation:

A rubric is a scoring tool that explicitly describes the instructor's performance expectations for an assignment or piece of work

Explain how the entity relationship (ER) model helped produce a more structured
relational database design environment.

Answers

The way that the entity relationship (ER) model helped produce a more structured relational database design environment is that

A database's primary entities and their relationships can be determined with the aid of an entity relationship model, or ERM. The role of the ERM components is easier to comprehend because they are graphically portrayed.

It is simple to translate the ERM to the tables and attributes of the relational database model using the ER diagram. The full set of needed database structures is generated by this mapping procedure, follows a set of clearly defined processes which are:

uses clearly defined images and rules to represent reality.the theoretical basisbeneficial for communicationTranslate to any DBMS type

How does the ER model aid in relational database design?

A visual representation of relational databases is an entity relationship diagram (ERD). Relational databases are modeled and designed using ERDs.

The Entity Relationship Model (ERM), which enables designers to perceive entities and connections visually, contributed to the creation of a more structured relational database design environment.

Therefore, Instead of defining the structures in the text, it is easier to understand them graphically.

Learn more about entity relationship (ER) model from

https://brainly.com/question/14424264
#SPJ1

Choose the best option to answer each question. Which output device allows a user to create a copy of what is on the screen? printer speakers earphones display or monitor

Answers

Answer: printer

Explanation:

You need to deploy virtual machines in the cloud to support big data processing. The virtual machines must not be reachable from the Internet. Data processing summaries will be uploaded from the virtual machines to an on-premises database server. The on-premises network is already configured to allow incoming connections from the Internet. What should you do to allow the required functionality while maximizing security

Answers

On-site servers have virtualization deployed. A server is essentially running in your own server on your own premises when you virtualize it. Your establishment's server.

What virtual machines to an on-premises database server?

It is possible to host solutions either on-premises (private cloud), on the public cloud (such as AWS, Azure, or Rackspace). Or with a combination of both, which is known as the hybrid cloud, thanks to the flexibility given by various virtualization solutions.

Therefore, You enter, launch virtualization on it, and create as many sessions on that system as you desire or are able.

Learn more about virtual machines here:

https://brainly.com/question/29535108

#SPJ1

what number am i. i am less than 10 i am not a multiple of 2 i am a coposite

Answers

Answer: 9 is less than 10, it is odd (not a multiple of 2), and it is composite (since it has factors other than 1 and itself, namely 3). Therefore, the answer is 9.

The answer is nine because if you write all the numbers that are under ten you can see that 2, 4, 6, and, 8 are multiples of 2 so you can’t do that so then you gotta see which ones are composite which is nine because 1, 5, and 7 don’t have any more factors than for example 7 and 1.

To configure a router / modem, what type of IP interface configuration should you apply to the computer you are using?

Answers

Answer:

hello your question has some missing parts

To configure a router / modem, what type of IP interface configuration should you apply to the computer you are using to access the device administration web app?

answer ; Gigabit interface

Explanation:

To configure a router/modem the type of IP interface configuration you should apply to the computer you are using to access the the devices administration web app should be Gigabit interface.

This is because Gigabit interface offers a very efficient and high band width and also a very high speed link which operates at 1000 Mbps, or 1 Gbps and it is the the standard used due to the speed it offers as it also offers improved performance over Ethernet

What is a method that invokes itself called?

A. base case method
B. recursive helper method
C. merge sort method
D. recursive method

Answers

Answer:

D. recursive method

Explanation:

I took the test on PLATO

In which SDLC step does the company translate broad, user-oriented systems requirements into the detailed specifications used to create a fully developed system

Answers

Answer:

Physical design.

Explanation:

Systems development life cycle (SDLC) is a strategic process that involves determining the overall system architecture, which is typically comprised of hardware, end users, physical processing components, software, and the communication channel that will effectively and efficiently satisfy the essential requirements of the system.

The system inputs and outputs is typically designed along with a plan of how the system's features will be navigated.

Basically, system design is divided into two (2) categories and these includes;

I. Logical design.

II. Physical design.

Furthermore, the design of service systems involves the process of planning, creating infrastructure, building communication, organizing staffs and standardization of a system so as to improve its quality and business relationships between the service provider and its clients.

In the physical design of systems development life cycle (SDLC), broad, user-oriented systems requirements are obtained from end users by companies and then translated into the detailed specifications that would be used to create a fully developed system.

Ok so im going to list my question and then the work so far.

Here is the code so far:(THE PROBLEM WITH THE CODE IS THAT THE IM SUPPOSE TO USE FIND() TO REPEATEDLY CHANGE THE OCCURRENCE OF THE WORD "MASK" TO THE WORD "HAT" IN THE FILE BUT AM KIND OF LOST HAVE BEEN WORKING ON THIS FOR A WEEK AND A HALF) ALSO I CAN NOT use the replace method, count method, split method, range() function, or lists in your solution. HAVE BEEN TRYING TO FIND SUM WAY TO USE FIND() BUT AM COMING UP SHORT



CODE:


#Get input file name

fileOne = input("Enter the input file name :")

#Get output file name

fileTwo = input("Enter the output file name :")

'''Get a string that will be searched in the source file

to locate all occurrences of the string'''

targetString = input("Enter the target string :")

'''Get a string that will replace each occurrence of the target

string in the source file'''

replacementString = input("Enter the replacement string :")
files =input("Enter a file with the word 'mask':")
#Open the input file in read mode

f1 = open(fileOne,"r+")

#Read the content of input file

content =f1.read()

#Replace the target string with the replacement string
content =f1.find('mask')
print(files[0:content]+ "hat"+ files[content +content:len(files)])
#Open the output file in write mode

f1 = open(fileTwo,"w")

'''Write the content after all of the occurrences of the target

string have been found and replaced by the replacement string'''


f1.close()

Ok so im going to list my question and then the work so far.Here is the code so far:(THE PROBLEM WITH
Ok so im going to list my question and then the work so far.Here is the code so far:(THE PROBLEM WITH

Answers

Answer:

qwerty

Explanation:

qwerty

Can someone help me with the following logical circuit, perform two actions. FIRST, convert the circuit into a logical
statement. SECOND, create a truth table based on the circuit/statement. (20 pts. each for statement and
truth table.

Can someone help me with the following logical circuit, perform two actions. FIRST, convert the circuit

Answers

Creation of Truth Table Based on the logical statement, we can create a truth table as shown below:

A B (not A) (not A) and B (not A) and B or A A or (not A) and B 0 0 1 0 1 0 0 1 0 0 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1

The first two columns show the input values, the next column shows the output of the NOT gate, then the output of the AND gate, then the output of the OR gate and finally the output of the logical statement.

We can observe that the output of the logical statement is the same as the output of the OR gate.

Given the logical circuit, we are required to perform two actions on it. Firstly, convert the circuit into a logical statement. Secondly, create a truth table based on the circuit/statement. Let's understand how to do these actions one by one:Conversion of Circuit into Logical Statement.

The given circuit contains three components: NOT gate, AND gate and OR gate. Let's analyze the working of this circuit. The two input variables A and B are first passed through the NOT gate, which gives the opposite of the input signal.

Then the NOT gate output is passed through the AND gate along with the input variable B. The output of the AND gate is then passed through the OR gate along with the input variable A.We can create a logical statement based on this working as: (not A) and B or A. This can also be represented as A or (not A) and B. Either of these statements is correct and can be used to construct the truth table.

Creation of Truth Table Based on the logical statement, we can create a truth table as shown below:

A B (not A) (not A) and B (not A) and B or A A or (not A) and B 0 0 1 0 1 0 0 1 0 0 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1

In the truth table, we have all possible combinations of input variables A and B and their corresponding outputs for each component of the circuit.

The first two columns show the input values, the next column shows the output of the NOT gate, then the output of the AND gate, then the output of the OR gate and finally the output of the logical statement.

We can observe that the output of the logical statement is the same as the output of the OR gate.

For more such questions on Truth Table, click on:

https://brainly.com/question/13425324

#SPJ8

what does the internet of things iot enable accenture

Answers

IoT platforms support applications' scalability and agility.

What is the Internet of things?

The term "Internet of things" refers to actual physical things that have sensors, computing power, software, and other technologies and can link to other systems and devices via the Internet or other communications networks and exchange data with them.

IoT platforms support applications' scalability and agility.

Agility in IoT component harvesting, discovery, and reuse.

Scale horizontal elements so they scale vertically. IoT has emerged in recent years as one of the most significant 21st-century technologies.

Continuous communication between people, processes, and things is now possible thanks to the ability to connect commonplace items—such as household appliances, automobiles, thermostats, and baby monitors—to the internet via embedded devices.

Therefore, IoT platforms support applications' scalability and agility.

Know more about the Internet of things here:

https://brainly.com/question/19995128

#SPJ4


Which is the best defense against ESD?
< Prev
Stand-off on motherboard
ZIF socket
Ground strap

Answers

The best defense against ESD is known to be called Ground strap.

What does grounding strap mean?

The ground strap is known to be a term that connote the grounding connection that tends to runs from a vehicle's engine to the area of  the negative battery terminal or that of the chassis.

Note that in the case above, both the negative battery terminal as well as the chassis of a said vehicle are known to be grounded.

Therefore, based on the above, one can say that the best defense against ESD is known to be called Ground strap.

Learn more about Ground strap from

https://brainly.com/question/14989495

#SPJ1

Question 19 of 2
Which of the following reasons for writing a formal business document would
lead you to write a proposal?
O A. To summarize what happened during a meeting
B. To tell your manager a project is on budget and on schedule
C. To describe what tasks you completed during the week
D. To convince your manager to use a new meeting organization tool

Answers

Answer:

D. To convince your manager to use a new meeting organization tool

Explanation:

a proposal is a plan or suggestion, especially a formal or written one, put forward for consideration or discussion by others: and D. is the only answer that is asking or proposing something.

an indicator is a comprehensive analysis of critical information

Answers

Answer:

True.

Explanation:

An indicator is a comprehensive analysis of critical information by an adversary normally providing the whole picture of an agency's capabilities.

Hope this helps!

An indicator is a comprehensive analysis of critical information by an adversary normally providing the whole picture of an agency's capabilities is true.

Thus, Information that is critical is integrity class-2 information. Samples 1 through 3 are given. according to 3 papers Make a copy Critical information is defined as information that must be shared from shift to shift in order to ensure the health, safety, and welfare of the people served.

Examples include, but are not limited to: irrational behavioral outbursts, sudden or unexplained mood swings in individuals, the administration of PRN medication, transportation issues, unanticipated trips to the doctor or hospital, routine doctor visits requiring follow-up, reportable and information.

All parties working on the Subcontract, including support staff, must be informed of critical information in order for it to be protected against unintentional release and to guarantee that all parties are aware of it.

Thus, An indicator is a comprehensive analysis of critical information by an adversary normally providing the whole picture of an agency's capabilities is true.

Learn more about Critical information, refer to the link:

https://brainly.com/question/32115676

#SPJ6

An array of integers can be assigned to a memory address in the ...
An array of integers can be assigned to a memory address in the .datanumbers
section of a MIPS assembly language program as show below. Here the length of the array is stored first, and then the elements of the array next.

Implement a MIPS assembly language program to perform the functionality of the following C program and print the updated array content, by listing each integer in it.

It should ask a user to enter three integers, a starting index, an ending index, and an integer to use for a comparison. It should examine only the elements in the array located from the entered starting index, to the entered ending index to check if each of them is greater the last entered integer, then if it is, subtract 3*the last entered integer to each such element in the array.

For instance, if a user enters 2, enters 9, then enters 3, then the output will be the following:

45

-6

14

-7

6

-17

2

-4

14

-26

2

19





i.e., the numbers that are located between the index 2 and 9 are examined to see if each of them is greater than the last entered number (3 in this case),

then each of such element is subtracted with 3 times that number (3 in this case) if it is.

If the entered ending index is larger than 11, then the program should exam elements in the array until the end, and if the entered starting index is less than 0, then it should start examining elements from the first one in the array.

.data

numbers_len: .word 12

numbers: .word 45, -6, 23, -7, 15, -17, 11, -4, 23, -26, 2, 19}





The following shows how it looks like in a C program:


int numbers[12] = {45, -6, 23, -7, 15, -17, 11, -4, 23, -26, 2, 19};

int startIndex, endIndex, num1;
int j;

printf("Enter a starting index:n");

//read an integer from a user input and store it in startIndex
scanf("%d", &startIndex);


printf("Enter an ending index:n");

//read an integer from a user input and store it in endIndex
scanf("%d", &endIndex);

printf("Enter an integer:n");

//read an integer from a user input and store it in num1
scanf("%d", &num1);

if (startIndex < 0)
startIndex = 0;


for (j = startIndex; j <= endIndex && j < 12; j = j+1)
{
if (numbers[j] > num1)
{
numbers[j] = numbers[j] - (3 * num1);
}
}


printf("Result Array Content:n");
for (j = 0; j < 12; j = j+1)
{
printf("%dn", numbers[j]);
}




The following is a sample output (user input is in bold):

Enter a starting index:

2

Enter an ending index:

9

Enter an integer:

3

Result Array Content:

45

-6

14

-7

6

-17

2

-4

14

-26

2

19

Please make sure it can output like the sample above

Answers

Answer:

A :)

Explanation:

This program extends the earlier "Online shopping cart" program. (Consider first saving your earlier program).

(1) Extend the ItemToPurchase struct to contain a new data member. (2 pt)

char itemDescription[ ] - set to "none" in MakeItemBlank()
Implement the following related functions for the ItemToPurchase struct.

PrintItemDescription()
Has an ItemToPurchase parameter.

(2) Create three new files:

ShoppingCart.h - struct definition and related function declarations
ShoppingCart.c - related function definitions
main.c - main() function (Note: main()'s functionality differs from the warm up)
Build the ShoppingCart struct with the following data members and related functions. Note: Some can be function stubs (empty functions) initially, to be completed in later steps.

Data members (3 pts)
char customerName [ ]
char currentDate [ ]
ItemToPurchase cartItems [ ] - has a maximum of 10 slots (can hold up to 10 items of any quantity)
int cartSize - the number of filled slots in array cartItems [ ] (number of items in cart of any quantity)
Related functions
AddItem()
Adds an item to cartItems array. Has parameters of type ItemToPurchase and ShoppingCart. Returns ShoppingCart object.
RemoveItem()
Removes item from cartItems array (does not just set quantity to 0; removed item will not take up a slot in array). Has a char[ ](an item's name) and a ShoppingCart parameter. Returns ShoppingCart object.
If item name cannot be found, output this message: Item not found in cart. Nothing removed.
ModifyItem()
Modifies an item's description, price, and/or quantity. Has parameters of type ItemToPurchase and ShoppingCart. Returns ShoppingCart object.
GetNumItemsInCart() (2 pts)
Returns quantity of all items in cart. Has a ShoppingCart parameter.
GetCostOfCart() (2 pts)
Determines and returns the total cost of items in cart. Has a ShoppingCart parameter.
PrintTotal()
Outputs total of objects in cart. Has a ShoppingCart parameter.
If cart is empty, output this message: SHOPPING CART IS EMPTY
PrintDescriptions()
Outputs each item's description. Has a ShoppingCart parameter.

(3) In main(), prompt the user for a customer's name and today's date. Output the name and date. Create an object of type ShoppingCart. (1 pt)

(4) Implement the PrintMenu() function in main.c to print the following menu of options to manipulate the shopping cart. (1 pt)
(5) Implement the ExecuteMenu() function in main.c that takes 2 parameters: a character representing the user's choice and a shopping cart. ExecuteMenu() performs the menu options (described below) according to the user's choice, and returns the shopping cart. (1 pt)


(6) In main(), call PrintMenu() and prompt for the user's choice of menu options. Each option is represented by a single character.

If an invalid character is entered, continue to prompt for a valid choice. When a valid option is entered, execute the option by calling ExecuteMenu() and overwrite the shopping cart with the returned shopping cart. Then, print the menu and prompt for a new option. Continue until the user enters 'q'. Hint: Implement Quit before implementing other options. (1 pt)

(7) Implement the "Output shopping cart" menu option in ExecuteMenu(). (3 pts)
8) Implement the "Output item's description" menu option in ExecuteMenu(). (2 pts)
(9) Implement "Add item to cart" menu option in ExecuteMenu(). (3 pts)
(10) Implement the "Remove item from cart" menu option in ExecuteMenu(). (4 pts)
(11) Implement "Change item quantity" menu option in ExecuteMenu(). Hint: Make new ItemToPurchase object before using ModifyItem() function. (5 pts)

Answers

Answer:

To create an online shopping cart. You need to do the following:

Update the ItemToPurchase struct to include a new data member called itemDescription.

Create three new files: ShoppingCart.h, ShoppingCart.c, and main.c.

Build the ShoppingCart struct with the following data members: customerName, currentDate, cartItems (which can hold up to 10 items of any quantity), and cartSize.

Implement the AddItem, RemoveItem, ModifyItem, GetNumItemsInCart, GetCostOfCart, PrintTotal, and PrintDescriptions functions for the ShoppingCart struct.

In the main function, prompt the user for a customer's name and today's date, and create an object of type ShoppingCart.

Implement a menu of options to manipulate the shopping cart in the PrintMenu function in main.c.

Implement the ExecuteMenu function in main.c to perform the menu options according to the user's choice.

Implement the "Output shopping cart" menu option in ExecuteMenu.

Implement the "Output item's description" menu option in ExecuteMenu.

Implement the "Add item to cart" menu option in ExecuteMenu.

Implement the "Remove item from cart" menu option in ExecuteMenu.

Implement the "Change item quantity" menu option in ExecuteMenu.

Note: Each step has a point value assigned to it, and some steps have hints provided.

https://www.celonis.com/solutions/celonis-snap

Using this link

To do this alternative assignment in lieu of Case 2, Part 2, answer the 20 questions below. You
will see on the left side of the screen a menu for Process Analytics. Select no. 5, which is Order
to Cash and click on the USD version. This file is very similar to the one that is used for the BWF
transactions in Case 2, Part 2.
Once you are viewing the process analysis for Order to Cash, answer the following questions:
1. What is the number of overall cases?
2. What is the net order value?
Next, in the file, go to the bottom middle where you see Variants and hit the + and see what it
does to the right under the detail of variants. Keep hitting the + until you see where more than a
majority of the variants (deviations) are explained or where there is a big drop off from the last
variant to the next that explains the deviations.
3. What is the number of variants you selected?
4. What percentage of the deviations are explained at that number of variants, and why did you
pick that number of variants?
5. What are the specific variants you selected? Hint: As you expand the variants, you will see on
the flowchart/graph details on the variants.
6. For each variant, specify what is the percentage of cases and number of cases covered by that
variant? For example: If you selected two variants, you should show the information for each
variant separately. If two were your choice, then the two added together should add up to the
percentage you provided in question 4 and the number you provided in question 3.
7. For each variant, how does that change the duration? For example for the cases impacted by
variant 1, should show a duration in days, then a separate duration in days for cases impacted
by variant 2.
At the bottom of the screen, you see tabs such as Process, Overview, Automation, Rework, Benchmark,
Details, Conformance, Process AI, Social Graph, and Social PI. On the Overview tab, answer the
following questions:
8. In what month was the largest number of sales/highest dollar volume?
9. What was the number of sales items and the dollar volume?
10. Which distribution channel has the highest sales and what is the amount of sales?
11. Which distribution channel has the second highest sales and what is the amount of sales?
Next move to the Automation tab and answer the following questions:
12. What is the second highest month of sales order?
13. What is the automation rate for that month?
Nest move to the Details tab and answer the following questions:
14. What is the net order for Skin Care, V1, Plant W24?
15. What is the net order for Fruits, VV2, Plant WW10?
Next move to the Process AI tab and answer the following questions:
16. What is the number of the most Common Path’s KPI?
17. What is the average days of the most Common Path’s KPI?
18. What other information can you get off this tab?
Next move to the Social Graph and answer the following questions:
19. Whose name do you see appear on the graph first?
20. What are the number of cases routed to him at the Process Start?

Answers

1. The number of overall cases are 53,761 cases.

2. The net order value of USD 1,390,121,425.00.

3. The number of variants selected is 7.4.

4. Seven variants were selected because it provides enough information to explain the majority of the deviations.

5. Seven variants explain 87.3% of the total variance, including order, delivery, credit limit, material availability, order release, goods issue, and invoice verification.

10. January recorded the highest sales volume, with 256,384 items sold for USD 6,607,088.00. Wholesale emerged as the top distribution channel, followed by Retail.

12. December stood out as the second-highest sales month,

13. with an automation rate of 99.9%.

14. Notable orders include Skin Care, V1, Plant W24 (USD 45,000.00) and

15. Fruits, VV2, Plant WW10 (USD 43,935.00).

17. The most common path had a KPI of 4, averaging 1.8 days.

18. This data enables process analysis and improvement, including process discovery, conformance, and enhancement.

19. The Social Graph shows Bob as the first name,

20. receiving 11,106 cases at the Process Start.

1. The total number of cases is 53,761.2. The net order value is USD 1,390,121,425.00.3. The number of variants selected is 7.4. The percentage of the total variance explained at 7 is 87.3%. Seven variants were selected because it provides enough information to explain the majority of the deviations.

5. The seven specific variants that were selected are: Order, Delivery and Invoice, Check credit limit, Check material availability, Order release, Goods issue, and Invoice verification.6. Below is a table showing the percentage of cases and number of cases covered by each variant:VariantPercentage of casesNumber of casesOrder57.2%30,775Delivery and Invoice23.4%12,591Check credit limit5.1%2,757

Check material availability4.2%2,240Order release4.0%2,126Goods issue2.4%1,276Invoice verification1.7%9047. The duration of each variant is as follows:VariantDuration in daysOrder24Delivery and Invoice3Check credit limit2Check material availability1Order release2Goods issue4Invoice verification1

8. The largest number of sales/highest dollar volume was in January.9. The number of sales items was 256,384, and the dollar volume was USD 6,607,088.00.10. The distribution channel with the highest sales is Wholesale and the amount of sales is USD 3,819,864.00.

11. The distribution channel with the second-highest sales is Retail and the amount of sales is USD 2,167,992.00.12. The second-highest month of sales order is December.13. The automation rate for that month is 99.9%.14. The net order for Skin Care, V1, Plant W24 is USD 45,000.00.15.

The net order for Fruits, VV2, Plant WW10 is USD 43,935.00.16. The number of the most common path’s KPI is 4.17. The average days of the most common path’s KPI is 1.8 days.18. Additional information that can be obtained from this tab includes process discovery, process conformance, and process enhancement.

19. The first name that appears on the Social Graph is Bob.20. The number of cases routed to Bob at the Process Start is 11,106.

For more such questions deviations,Click on

https://brainly.com/question/24251046

#SPJ8

Are AWS Cloud Consulting Services Worth The Investment?

Answers

AWS consulting services can help you with everything from developing a cloud migration strategy to optimizing your use of AWS once you're up and running.

And because AWS is constantly innovating, these services can help you keep up with the latest changes and ensure that you're getting the most out of your investment.

AWS consulting services let your business journey into the cloud seamlessly with certified AWS consultants. With decades worth of experience in designing and implementing robust solutions, they can help you define your needs while executing on them with expert execution from start to finish! AWS Cloud Implementation Strategy.

The goal of AWS consulting is to assist in planning AWS migration, design and aid in the implementation of AWS-based apps, as well as to avoid redundant cloud development and tenancy costs. Project feasibility assessment backed with the reports on anticipated Total Cost of Ownership and Return on Investment.

Learn more about AWS consulting, here:https://brainly.com/question/29708909

#SPJ1

How do advertisers use data to know which products would most likely appeal to you

Answers

Answer:

it gives children or adults something to think about

Explanation:

Other Questions
suppose that 5 x 12 x = [infinity] n = 0 c n x n . find the first few coefficients. answer exactly. NEED ANSWERS ASAP!!! if an object is moving at a speed of V kilometers per hour, how many meters does it travel in M seconds? (its asking for the equation on how to solve this problem) A company billed a client for services performed on January 10. The customer paid one-half of the amount owed on January 20 and the other one-half on February 24. When should the company record the related Service Revenue? Calculate the heat change involved when 2.00 L of water is heated from 20.0C to 99.7C in an electric kettle. Show work please What is the term of the study for weather and climate Who is this saxophone player I wonder what his name is... in contrast to digital marketing, where customers receive clear and correct information about any product or service, there is little likelihood that customers will be misled by salespeople in traditional marketing. what step in reviewing a remittance advice comes after comparing the ra to the original insurance claim? a fair coin is flipped 10 times. the probability that there are an equal number of heads and tails or the first three flips are heads is the sum of the probabilities that there are an equal number of heads and tails and that the first three flips are heads. What is the main idea of Katz v. United States? Why is that important to the DLK case? according to your textbook, it is important to remember that a test is only a test, it is not the end of the world. it is also important to remember that a test only measures: Which movie theme did filmmakers introduce in 1970 1. Why does a change in the structure of a protein matter? 2. Which would most likely have a more lasting effect?A. a significant mutation to the DNA of a geneB. a mutation to the mRNA transcribed from it Social: How did geography impact Japan's population and the organization of its cities? Jonathan's checking balance is -45 dollars. After receiving his allowance he deposits $7 into the account. What is the balance of the account after Jonathan's deposit? Define a constructor as indicated. Sample output for below program:Year: 0, VIN: -1Year: 2009, VIN: 444555666Using C++ language Heat-killed cells of a phosphorescent strain of bacteria were mixed a living non-phosphorescent strain and the resulting bacteria were phosphorescent. The same experiment was repeated except that protease was added to the heat-killed cells before the live cells were added; in this case the resultant cells were not phosphorescent. What would be a reasonable conclusion from this experiment PLEASE PLEASE HELP ME PLEASE!! A rope is x metres long. Juan cuts off 20% of the rope to tie up a box. He cuts off another 75m for his friend. Write an expression to describe the length of the rope that Juan has left. Which best describes a bacteriophage What is the force that is used to accelerate a 9 kg wagon 16 m/s squared?