Jdourado Posted June 5, 2017 Posted June 5, 2017 1. Implement a function that allows the user to enter a list of products and their respective prices, so that this information is stored in a list organized by product-price pairs. To terminate data entry by the user, one must digitally end the word after the last product price-name. The list resulting from data entry should have a structure similar to the following: Rice 5.00 Beans 4.00 Apple 2.00 Milk 2.50 * Orientations: - In addition to recursion, you can use the loop command to implement the read loop. - Define a global variable where the list will be stored at the end of the reading. - Product-price pairs you can organize either as a cons, a sublist or a structure with product and price fields. - Save the list structure to a text file for easier data entry and write a function that allows you to retrieve this data from the file. 2. Implement a function that only displays a menu so that the user can choose one of the operations of the system, as follows: Search Show products in alphabetical order Shopping 3. Implement a function or set of functions, which, from the options menu and user input, perform the following tasks: A) Price search for a product: allows the user to provide a name of a product and the program either says it did not find the product or displays its price. B) Show products alphabetically: displays the entire list of products available with their prices on the screen. C) Shopping: allows the user to provide product names and quantities that they want to buy. At the end the program issues a list of all products purchased and displays the total value of purchases. Quote
BIGAL Posted June 6, 2017 Posted June 6, 2017 Some answers 1 You can sort a list as example sort list x,y,z on Y value ie price 1 Save to a file YES write-line. 1 Read-line from file. 2 You can turn off a lot of stuff in Autocad like menu etc and on start up have your menu appear. 2-3 Functions like search YES can be done 4 Why do it in Autocad question to you Jdourado. ? Quote
Jdourado Posted June 6, 2017 Author Posted June 6, 2017 First I need to make a clip after playing for autocad Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.