**Make changes before upload. I will not be responsible for your marks.**


Instructions

Please read the following instructions carefully before solving & submitting assignment:

It should be clear that your assignment will not get any credit (zero marks) if:

o        The assignment is submitted after the due date.

o        The submitted code does NOT compile.

o        The submitted assignment is other than .CPP file.

o        The submitted assignment does NOT open or file is corrupted.

o        The assignment is copied (from other student or ditto copy from handouts or internet).

Uploading instructions


For clarity and simplicity, you are required to Upload/Submit only ONE .cpp file.

 

Note: Use ONLY Dev-C++ IDE.

Objective

The objective of this assignment is

 

o   To make you familiar of Programming with List Data Structure.

 

For any query about the assignment, contact at cs301@vu.edu.pk

 

GOOD LUCK

You are required to implement a simple Shopping List Manager using ArrayList data structure. The program must meet the following requirements.

 

1.      Write a C++ program that allows users to manage a shopping list.

2.      Use ArrayList data structure to store items in the shopping list.

3.      Your program should contain the following functionalities.

a.       Add item to the shopping list.

b.      Remove items from the shopping list.

c.       View current items in the shopping list.

d.      Clear the shopping list (i.e. remove all items).

e.       Exit the program.

4.      The program should display a menu to the user and allow them to choose options using numbers.

5.      Ensure error handling for invalid inputs.

6.      Use Object oriented programing principles where applicable.

An output screenshot is given at the end of this file for your complete understanding and reference.



****************************************************************************************************************************



****************************************************************************************************************************


Note: Don’t use ArrayList Built in library for assignment development. You must follow the following program structure for naming and to build the program. Otherwise, you will get ZERO marks.

 

Program Structure:

Class: ShoppingList

Attributes:

1.      Items[100] : string

2.      ItemCount: int

 

Explicit Default Constructor:

1.      ShoppingList()

Functions:

1.      addItem(…)          //Where … represents function takes parameters.

2.      removeItem(…)   //Where … represents function takes parameters.

3.      viewList()

4.      clearList()

 

Default Function:

1.      main()

Post a Comment

Don't Forget To Join My FB Group VU Vicky
THANK YOU :)

Previous Post Next Post