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

  Draw a functional block diagram of the valve

Draw a functional block diagram of the valve, showing input and output positions, coil voltage, coil current, and spool force.

  Overwrite the input and the number of local variables

overwrite the input and the number of local variables should not depend on n - Prepare pseudocode converting M to be stored in column major order.

  How can each diagram relates to the solution

You are an outside consultant to a large chain of grocery stores. The store's management would like to dynamically check store's inventory from the central office.

  Write a program to simulate the authentication process

The user would enter 23113 instead of 12345. This doesn't divulge the password even if an attacker intercepts the entry because 23113 could correspond to other PIN numbers.

  What aspects of environment support structure of colleges

What aspects of environment support structure of colleges.

  Plot astronomical distances and path of celestial objects

I think that one of the most interesting fields where conic sections are applied is astronomy. As a welder, I had to cut ellipse-shaped holes into the side of tanks routinely.

  Explaining the trust/security domain boundaries

Recognize and explain Trust/Security Domain boundaries which may be applicable to the personal computer (workstation) security in the business context.

  Show both the subscript of the largest item in arr

show both the subscript of the largest item in arr. want help with writing a program that: Lets arr be an array of 20 integers

  Detecting hidden files on suspect drive with forensics tools

What procedures are used by the suspect in order to hide the files on suspect drive, or formatted media and how does computer forensics investigator examine the hidden, password protected or the encrypted files with forensics tools?

  Differences between wats and leased lines

What are some of the challenges being faced by organizations as they implement voice and data into a network.

  Designing a web-based system for airline

Explain each section of dialogue box. Consider, you are designing a web-based system for an airline. Design the dialog diagram for some sample screens which users will require to navigate through (you must have about five screens and four levels).

  Utilization of cryptography

You have been hired to offer the advice regarding the utilization of the cryptography to developer of new two products within a company.

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