Write an iterator for the shape class

Assignment Help Computer Engineering
Reference no: EM131158447

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.

Reference no: EM131158447

Questions Cloud

Illustrate two to three instances in which you believe : Illustrate two to three instances in which you believe that your gender intersected with other statuses / orientations-such as your race, ethnicity, disability status, or sexuality-in a classroom environment. Propose one instructional strategy tha..
Problems to avoid plagiarizing : How can procrastination and pressure to succeed lead to plagiarism? What are some other reasons students might resort to plagiarism? How can you combat these problems to avoid plagiarizing?
Horizons approach that mckinsey proposes : Does your organization implement the three horizons approach that McKinsey proposes? If not, make your own proposal for each horizon. Be creative.
Potential effect of each contaminant : Using at least one scholarly source; discuss the potential effect of each contaminant on the town's water source and the people who drank the water?
Write an iterator for the shape class : Write an iterator for the Shape class. Use this iterator to traverse the collection of shapes that are created to display on the page.
Distill the report into an effective presentation : Prepare at least one pages' report (in your own words) and then distill the report into an effective presentation?
Analyze the purpose of quality management in the health care : Analyze the purpose of quality management in the health care industry. Identify how various health care stakeholders define quality. Identify roles in health care related to Quality Improvement
Work on an mne multinational enterprise : Please work on an MNE (Multinational Enterprise) from an advanced market (such as Australia, France, Germany, Japan, South Korea, UK, USA etc.) and study how it entered a specific foreign emerging or developing market (such as Brazil, Russia, India,..
When can we determine probationary period be deemed success : In your written assignment this week, describe what factors may cause probation to be successful or not. What are the roles of the corrections organization, the probation officer, and the offender in the outcome of the probationary period? When c..

Reviews

Write a Review

Computer Engineering Questions & Answers

  Important hardware innovations

Using the Timeline - CHM Revolution website, find and explain what you believe to be the two most important hardware innovations.

  Computer platformscomputer systems may be classified into

computer platformscomputer systems may be classified into two categories classical and quantum. this assignment will

  The microprocessor simulator

Modify the program in 07textio.asm to include three procedures. The first should read text from the keyboard and store it in RAM. The second should convert any upper case characters in the stored text to lower case. The third should display the te..

  Make function that outputs the elements stored in the tree

Write down a program containing a function that outputs the elements stored in the tree (integers) to the screen. The integers have to be output level by level in the order they appear in the tree.

  Questionon modern networked computers maintaining the

questionon modern networked computers maintaining the correct time on each machine is important. computers on a lan or

  Task 1you are required in your new role as an enterprise

task 1you are required in your new role as an enterprise architect ea to do a swot analysis of a current ict servicein

  Plan and implement a stringed musical instrument class

Plan and implement a stringed musical instrument class

  Data storage problem in the database tables

You must select the data storage problem of your interest and recognize the different pieces of the data which must be stored within the database.

  Define the context in which normalization is used

define the context in which Normalization is used. What is its purpose.

  Estimatedrtt in terms of four sample rtts

For a provided TCP connection, assume four acknowledgments have been returned with corresponding sample RTTs SampleRTT4, SampleRTT3, SampleRTT2, and SampleRTT1. Express EstimatedRTT in terms of four sample RTTs.

  You are the lead engineer for trades networking group a

you are the lead engineer for trades networking group a small consulting firm located in the southeast united states.

  Investigate and describe how data is structured stored and

there are six problems that can be minimized by using the database approachdata redundancydata isolationdata

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd