Write an iterator for the shape class use this iterator to


Topic: computer science (java android studio)

An app built in android studio called shapestyle.

It has three buttons, cricle, rectangle and style. circle button displays circle on the screen and rectangle button displays an rectangle.

Style button has six style which changes the style of the shapes for example first style has red border and black fill and second style has green border and yellow fill etc.

The shapes also fade away when more shapes appear on the screen. the app works but now I need to do some additional work on the app.

I. Project Description Overview

The purpose of this project is to give you practice with testing and with writing iterators. You will use and modify your code from the last project, add an iterator class, and perform tests on your program. Take notes as you are performing the steps outlined below as the report that you will submit for the most part discusses changes required from your previous submission.

App Description

Step 1: Rewrite f Reformat your code

When not written carefully, programs such as the ones you have written for this class can become jumbled. As has been discussed in class, unit testing requires you to be able to test small units of code in (as close to) isolation (as possible). Examine your previous project code and decide if you can use unit testing on sufficiently small units of it. If not (which is most likely the case), rewrite the portions of your code so that they can be unit tested.

Step 2: Write a Shape Iterator
Write an iterator for the Shape class. Use this iterator to traverse the collection of shapes that are created to display on the page.

Extra Credit: Write a Lambda Expression
Modify your iterator to accept a Lambda expression that determines the order in which the collection is traversed. At a minimum you must have two traversal schemes: traverse by style number, traverse by reverse order of instantiation.

Step 3: Write Unit Tests
Write unit tests for your program. These should be as comprehensive as possible. Divide the tests up into local and instrumented tests.

Make sure your program passes all the unit tests. The tests will be run on the grader's machine.

i. Each change you had to change from the previous project in order to perform unit testing and why.
ii. Describe what tests were run locally and which were run instrumented and why.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write an iterator for the shape class use this iterator to
Reference No:- TGS01541742

Expected delivery within 24 Hours