Page 1 of 1

1. Problem #1 (15 points): Write a CLIENT program (this means a MAIN it does NOT mean adjusting the data type) that crea

Posted: Fri May 20, 2022 10:00 am
by answerhappygod
1 Problem 1 15 Points Write A Client Program This Means A Main It Does Not Mean Adjusting The Data Type That Crea 1
1 Problem 1 15 Points Write A Client Program This Means A Main It Does Not Mean Adjusting The Data Type That Crea 1 (28.07 KiB) Viewed 24 times
1. Problem #1 (15 points): Write a CLIENT program (this means a MAIN it does NOT mean adjusting the data type) that creates a list of type int (so one list instance): alist. Add 10 random integers in the range of 1-100 to the list. Add a CLIENT function to your main that computes the sum of all the integers in your list, the function will need to take a list as an argument. You can use ArrayList.h or LinkedList.h for your list but do NOT change the code for ArrayList or Linkedlist. Submit ONLY your main method for this program. Preferably copy and paste but I set it up so you can submit files if need be. 2. Problem #2 (5 points): Pretend you want to add a contains function to the Listinterface (do not worry about the implementation remember the Listinterface.h only has the specification. The contains function should take a list entry and return true if it's in the list and false if not. Write the preconditions and post conditions for your contains function and statement of its purpose. Then write the prototype you would add to Listinterface.h. PROTOTYPE and PRE/POST CONDITIONS ONLY do NOT submit the implementation