In you will be focusing on allowing multiple of the

In you will be focusing on allowing multiple of the four transactions listed. You will also be authenticating the user’s credentials (username and password) at least once. The customer’s account details are as follows:

CustomerUsernamePasswordAccount #Member LevelStore CreditAddressJane Smithjsmithblue123123456789Gold3000.00100 W New Haven Ave, Melbourne, FL 32901Ellen Sue Doeedoepink234234567890Blue650.00235 South Street, Bronx, NY, 21110Michael Blackmblackbrown124235765437None324.0056 N Pathway Rd, Phoenix, AZ, 56565John Carterjcartergreen289987654251Diamond9000.001060 W Addison St, Chicago, IL 60613

Product information is as follows:

SKUNameItems in unitPrice per unitQuantity on HandHF-342½ in Bolt5020.00200LK-322¼ in Nail255.7576KF-231Hammer115.23100

The information above is found in the attached file, accounts.dat and products.csv respectively. You must read the information from these files to be able to complete the program. Hint: Use parallel arrays.

For this report, update the program to allow one of the above users to safely log in to their account, complete a maximum of 3 transactions, and end the program. Three incorrect attempts at entering the username and password will end the program. 

1 – Purchase an item (make a new purchase)
2 – View all items (list all items available)
3 – Get an estimate (estimate the cost for purchasing an item)
4 – Update Account (update the user information)
5 – Log Out (exit/end the program)

Each of the 4 transactions should be defined in its own function. At the end you should have a minimum of 5 functions (including main). You may define additional functions as you see fit. The customer may purchase multiple of that item but not more than the available quantity on hand. All purchases are made with store credit; therefore, the user cannot purchase items exceeding their store credit. There is a 6% sales tax on all items. Customers are granted pre-tax discounts on purchases over specified amounts. The table below describes the discount rate based on membership level. Any incorrect transactions will display an appropriate error message. After the purchase is complete, show all details in a receipt format, including the updated credit balance.

Membership LevelDiscount RateRequired SpendDiamond12%$700+Gold8.5%$300+Blue6%$100+

Note that the Gold and Diamond level members are still allowed the lower discount rate if they do not meet their spend level. For example, if a gold or diamond member spends $200, they should receive a 6% discount. 

After updating the user account, it should display the updated account information to the user. The user cannot update their username.

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Unit 2.1 DB: The Evolution of the Family Families have

Unit 2.1 DB: The Evolution of the Family Families have changed over the years. Discuss how and the various household types we find today as compared to past generations. What factors are influencing the increase in the number of single-person households and married couples without children? Add question at the

Write about”Coraline” as well as Nosferatu (a story similar to Count

**Disclaimer** Writer must have read the book or have some knowledge of “Coraline” as well as Nosferatu (a story similar to Count Dracula”. ***if needed I can submit some pictures of materials of reviews/slideshows we had for class*** Write a short essay (about three pages) in response to ONE of

Difference between Diagnostic and Statistical Manual five and the Diagnostic and Statistical Manual four

Looking at the difference between Diagnostic and Statistical Manual five and the Diagnostic and Statistical Manual four TR. For this assignment, you will develop an annotated bibliography related to the diagnosis of substance use disorders. Please use peer-reviewed journal articles http://guides.lib.jjay.cuny.edu/c.php?g=288333&p=1922599 (If you have not done an annotated bibliography previously,

Enduring understandings and essential questions are part of meaning-making. In

Enduring understandings and essential questions are part of meaning-making. In your mini-unit, you will be addressing only one standard. For this discussion, draft two understandings and two essential questions that support meaning-making and transfer for your students in regard to the standard. Indicate the standard you are addressing in your mini-unit.

Worth 8% of your final grade. For this assignment, you will be assigned eight (8) specific ingredients from four different products. You will be given four questions in this quiz, and for each questio Nursing Assignment Help

Worth 8% of your final grade. For this assignment, you will be assigned eight (8) specific ingredients from four different products. You will be given four questions in this quiz, and for each question, you will be asked to report on two ingredients of the product. For each specified ingredient,

What are some common stressors you experience on a daily

What are some common stressors you experience on a daily or weekly basis? What dimensions make these events stressful (negative, uncontrollable, ambiguous, overload (refer to chapter 6). How has stress adversely affected you? After you’ve reflected on these stressors, view the video Building Psychological Resilience (Links to an external site.) by

2) For a 0.46 wt%C Ni-Cr steel plate, show any

   2) For a 0.46 wt%C Ni-Cr steel plate, show any calculations to support your responses to the following queries:  After pouring the melt into a refractory container and allowed to furnace cool to 728°C,calculate the fractional amounts of the equilibrated phases formed within a plate.  For a steel with the

Discussion: You are doing the intake report for a client

Discussion: You are doing the intake report for a client who has come to the agency due to an episode of domestic violence. Her partner is in jail but will be released in 48 hours and has vowed to track her down and kill her. She is looking for a

State and Local Agencies – Premium Paper Help

Premium Paper Help is a professional writing service that provides original papers. Our products include academic papers of varying complexity and other personalized services, along with research materials for assistance purposes only. All the materials from our website should be used with proper references.

Conduct research about one hematologic malignancy from the list below

  Conduct research about one hematologic malignancy from the list below and summarize the typical presentation (especially laboratory findings such as WBC, RBC, platelets), etiology, common differential diagnosis, typical diagnostic work-up, treatment plan, preventative measures, appropriate referrals, screening tools/diagnostic-specific scales tools (if any), and additional information that would be important

Research Paper Instructions: Articles report on original research or

 Students will write a scholarly paper that is a minimum of 8-10 pages in length (8-10 pages excluding the title page, abstract, and reference page) References may be found in the APUS library or search engines such as Google Scholar. The paper must include at least five, peer-reviewed sources that

Interview and share the story of an entrepreneur. It should

Interview and share the story of an entrepreneur. It should be someone you don’t already know, but admire. There are no requirements for specific questions, but make it interesting. 600-800 words What’s impressive about this person? What has their entrepreneurial journey been like? What can you learn from them?

Create an historical overview of selected leadership definitions by constructing a time-line figure illustrating how leadership definitions varied over time.

Part II: Create an historical overview of selected leadership definitions by constructing a time-line figure illustrating how leadership definitions varied over time. The time-line will span three decades and include a minimum of three (3) definitions from different sources that are then positioned across the time-line. Place the time-line and

Question 1: Monumental Architecture and Sculpture The cultures we studied

  Question 1: Monumental Architecture and Sculpture The cultures we studied this week produced architecture and monumental sculpture, in addition to smaller works of art. Locate three examples of architecture or monumental sculpture from three different cultures listed here: India, China, Japan, Korea, or the Pacific Cultures. First, completely identify

Public Policy Case

Summarize the Case – describe case in detail, identify key decision makers, identify stakeholders, identify all issues surrounding the case Identify key decisions that were made within the case and why they were made Identify what lead to the point where a decision had to be made by key decision

In looking at the importance of access to data for

In looking at the importance of access to data for nursing decision-making, and considering an issue at my place of employment where I do not always get access to important data, one common scenario instantly comes to mind.     I will actually be leaving my present company and starting a

PSY 540 SNHU Memory and Geriatric Mental Health Discussion Nursing Assignment Help

How does multitasking while studying (e.g., listening to music while reading, or texting while reading) influence attention to course material? How do individuals with ADHD perform in an online learning environment, and what strategies can help them succeed? What strategies can teachers and students use to increase attention to relevant