CMPUT 301

Software Engineering

Lab 2 Instructions


Lab 2 Instructions

In Lab 2, we'll be doing the following:

Lab 2 Participation Exercise

Task: Modify/expand ListyCity to allow for the addition of new cities as well as the deletion of existing ones from the city list. The specifics of the design of this functionality are up to you.

If you could not attend the labs or do not have the code for ListyCity, follow the instructions in Lab 2 Example - Instructions.

Hints:

  1. You may want to use the onClick callbacks of Compose components such as Button, as demonstrated in the lab.

  2. Consider how the city list is stored and modified. The CityRepository from the lab provides controlled functions for modifying the Compose city list.

  3. Ideally, you should consider treating cities as objects, however, in this exercise it may not be necessary.

Here are some screenshots from an example application that demonstrate the required functionality.

Your app does not need to look exactly like this demo!!!

  1. Press "ADD CITY" then type the name and press "CONFIRM". This adds a new city name to the list

  2. Tap a city name to select it then press "DELETE CITY" to remove the city from the list.

Screen1 Screen2 Screen3 Screen4

Submission

Canvas

Note: Proper completion of this exercise is considered as part of course participation.

Due Date

Friday after the Thursday lab at 5 PM