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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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