Question

Writing a cash register program with IAR Embedded workbench . The program is not adding the items but just displaying the price of the first it.

Writing a cash register program with IAR Embedded workbench . The program is not adding the items but just displaying the price of the first it.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

def get_item(self):

        in_price=0

       for item in self.item_list:

             price=item.get_price()

return price

def get_price(price):

  price+=item.price      

Add a comment
Know the answer?
Add Answer to:
Writing a cash register program with IAR Embedded workbench . The program is not adding the items but just displaying the price of the first it.
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • what is the temp variable used for in the program (IAR embedded workbench) IIC vaTUL UIT...

    what is the temp variable used for in the program (IAR embedded workbench) IIC vaTUL UIT THe LEDs when a switch is chan for(:) if(switchesGet(&temp)) count+i lagz - LEDsPut count): flags sevenSegPut DippIDi, count): flag4 - sevensegPut DisplD2, cnunt) for (i-oi.く100;i + + ) { // Software time delay to make operations visible for G-ojci00ot) Execute/Run the program with the original simple switchesGet driver in mur wwhat happens then repeat the o

  • Write the following program in Java using Eclipse. A cash register is used in retail stores...

    Write the following program in Java using Eclipse. A cash register is used in retail stores to help clerks enter a number of items and calculate their subtotal and total. It usually prints a receipt with all the items in some format. Design a Receipt class and Item class. In general, one receipt can contain multiple items. Here is what you should have in the Receipt class: numberOfItems: this variable will keep track of the number of items added to...

  • PYTHON3 code Each of you will create a cash register / point of sale for your...

    PYTHON3 code Each of you will create a cash register / point of sale for your favorite retail establishment (restaurant, store, website, etc..). The program should have a way to input an indefinite number of items (items, quantities, price); This should be stored as a list of lists in your program. It should generate a "receipt" - a list of items showing what you bought; It should generate a total amount spent including a tax computation. It should be written...

  • Complete the CashRegister class by implementing the methods and adding the correct attributes (characteristics) as discussed...

    Complete the CashRegister class by implementing the methods and adding the correct attributes (characteristics) as discussed in class. Once complete, test the class using the CashRegisterTester class. Make sure you have 3 total items in the cash register. I have two classes, the first is CashRegisterTester below: public class CashRegisterTester { public static void main(String[] args) { //Initialize all variables //Construct a CashRegister object CashRegister register1 = new CashRegister(); //Invole a non-static method of the object //since it is non-static,...

  • Write a C++ program that reads text from a file and encrypts the file by adding...

    Write a C++ program that reads text from a file and encrypts the file by adding 6 to the ASCII value of each character. See section 5.11 in Starting out with C++ for information on reading and writing to text files. Your program should: 1. Read the provided plain.txt file one line at a time. Because this file has spaces, use getline (see section 3.8). 2. Change each character of the string by adding 6 to it. 3. Write the...

  • Write a program in C++ that uses a class template to create a set of items....

    Write a program in C++ that uses a class template to create a set of items. . . The Problem Write program that uses a class template to create a set of items. The program should: 1. add items to the set (there shouldn't be any duplicates) Example: if your codes is adding three integers, 10, 5, 10, then your program will add only two values 10 and 5 Hint: Use vectors and vector functions to store the set of...

  • Write a program that first asks the user how many budget items they have. Then using...

    Write a program that first asks the user how many budget items they have. Then using dynamic arrays, create the appropriate arrays to hold the following data: Allow the user to enter the budget items and amount budgeted for the number items created in the dynamic array. (For your testing, just use four or five.) Once all budget items are entered, the program should then output each budget item, the amount of money budgeted for that item, and the percentage...

  • Python 3 IDE/AWS Problem You are tasked with writing a new program for your company that...

    Python 3 IDE/AWS Problem You are tasked with writing a new program for your company that keeps track of the customer’s information and his or her current bill. The company wants the name, address, phone number, and balance to be stored for each customer. This program will demonstrate the following: How to use a class to organize data How to use methods to access the data of a class How to create objects from a class Solving the Problem Step...

  • Module 6 - Cash Register (10 Points) We are going to write a program that simulates...

    Module 6 - Cash Register (10 Points) We are going to write a program that simulates a customer's transaction at a cash register. You will organize your code using functions. Each of the functions below counts for 2 points. You must create functions allowing the user to: 1. Add an item to the order. No name or list of items is needed simply prompt the user for a dollar amount to add. 2. Clear all transactions. Set the amount of...

  • Writing a program to represent a college food cabinet. How would i start this Shelf Class....

    Writing a program to represent a college food cabinet. How would i start this Shelf Class. The purpose would be to store an array of Food objects. Each shelf created also needs a different number of food objects, so i know dynamic memory allocation should be used. Here are the variable that are in the Shelf class: The name of the Shelf  A pointer to the array of Food objects, and because pointers don’t have any addition info on...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT