ITC558 CSU | Program with File Handling | Programing

Home Recent Questions ITC558 CSU | Program with File Handling | Programing


Rewrite the program for Assignment 1 to calculate the cost of delivery for his customers using functions.
Prompt the user to enter the purchase total. Pass the purchase total to a function as an argument to validate the purchase total above $150 and return True/False from the function to the calling code. If the return value is False, show an error message and asks the user if he/she wants to continue.

If the return value from the first function is True, call another function that calculates the cost of delivery for a customer. Ask a user to enter the number of the items that need to be delivered and delivery day and pass them to the function. Return the cost of delivery and the total cost to the calling code and display them to the user.

Make your program loop, prompting the user for whether they would like to calculate another delivery cost. Keep track of the number of the purchase and when the user exits, print out the total number of the purchase that entered to the system and the total cost of deliveries.

You should use functions in the program. Functions must follow a good programming style.

All the currency figures must be displayed as floating-point numbers with 2 decimal places.

Your program should be able to handle some exceptions and invalid inputs, such as:

·Negative values.

·Invalid delivery day (1 for same day delivery and 2 for second-day delivery). ·Non-numeric and empty values

You need to develop your program by completing the following three tasks:

Search Here

Latest Reviews

  • Kannon
    13 Jul, 2019

    I asked for essay help from Assignment Help 4 Me and I am happy that the essay writers completed my task on time. The prices they asked for are worth in comparison to the services rendered.

  • Liam
    13 Jul, 2019

    Assignment Help 4 Me is the best help provider. I took assistance to get my essay completed and I am glad that the writers delivered the quality content as they promised within the time committed.

  • Silas
    12 Jul, 2019

    Accounting is a very interesting subject but when it comes to assignment writing, I feel hard to get through the same. But, since the assignments have to be completed somehow, I preferred to avail online help from Assignment Help 4 Me. All thanks to them that they helped me complete my work on time at reasonable prices.

View All Reviews


Assignment Help 4 Me