Create a scroll component consistent

Assignment Help Computer Engineering
Reference no: EM131672617

Project Overview -

A scroll is a data structure that is similar to a list in that it stores elements in a sequence. Unlike a list, a scroll keeps track of a distinguished position in the sequence that we will call the "cursor position". In this assignment we will represent a scroll as two side-by-side sequences - a left sequence and a right sequence. The position between the left sequence and the right sequence is the cursor position. The cursor position can be at the beginning of the scroll, at the end of a scroll, or between to elements in the scroll. We say that the elements to the left of the cursor are before the cursor, while the elements to its right are after the cursor.

  • [ ][A B C] - A scroll with three elements whose cursor is at the beginning of the scroll.
  • [A B C][ ] - A scroll with three elements whose cursor is at the end of the scroll.
  • [A B][C D] - A scroll with four elements whose cursor is in the middle of the scroll.

Unlike a Java list, a scroll is not a random access data structure. You cannot immediately "jump" to a particular position. You must scroll backwards (retreat) or forward (advance) to arrive at a new position.

Your assignment will be to create a scroll component consistent with the following class diagram.

Bounded Stack Recordings

The recordings on a bounded stack component show how to create and test a stack component from scratch. They may be able to help you better understand how to create and test the scroll component. However, there are several things included in the stack component videos which do not apply at all to this assignment. They include the following:

  • You will not have to create separate projects for the scroll interface and implementations. Put everything in the same project.
  • You can try to give the representation, abstraction function, and representation invariant in the main Javadoc comment for both concrete classes: StackScroll and ListScroll. But you do not have to, and I am not going to grade this.
  • The scroll component will not have an isValid method.
  • The scroll component will not be bounded.

The videos are entirely optional, and the may or may not be helpful to you. Therefore, it is entirely up to you whether to view them or not. They are broken up into section, so you may want to view a particular section if you think it may be helpful.

Various Notes

  • For the StackScroll implementation, you are restricted to using only three stack methods: push, pop, and size.
  • For the swapRights method, you must implement this in three different places: StackScroll, ListScroll, and AbstractScroll. The StackScroll implementation should handle the method call when both scrolls are stack-scrolls, the ListScroll implementation should handle the method call when both scrolls are list-scrolls, and the AbstractStack implementation should handle the method call when the scroll implementations are not the same. Therefore the StackScroll and ListScroll methods will be primary methods and the AbstractScroll method will be a secondarymethod.

Attachment:- Assignment File.rar

Reference no: EM131672617

Questions Cloud

What happened as the conflict occurred : Conflict Scenario Describe the conflict situation. What happened leading up to this conflict situation? What happened as the conflict occurred?
Calculate the effect on the net present value : Calculate the effect on the net present value of the following two changes in assumptions. (Treat each item independently of the other.)
Often interviews are conducted with existing employees : Often interviews are conducted with existing employees when an organizational diagnoses has been deemed necessary.
Using the six sigma approach : Using the Six Sigma Approach (DMAIC), provide an example situation that utilizes the five-step plan,
Create a scroll component consistent : Bounded Stack Recordings - The recordings on a bounded stack component show how to create and test a stack component from scratch
Analyze the organizations human resource management policies : Research and analyze the organization's Human Resource Management programs, policies, procedures, or initiatives.
How did they invent the technology : Choose three major inventions that have lead to successful products. Who were the inventors? How did they invent the technology?
In either designing the job-influence success : In either designing the job, or in hiring to fill the job, does your organization consider any of the individual factors that might influence success?
Develop a list of three potential fieldwork locations : Develop a plan in Module 2 in which you identify options and develop time lines for the fieldwork you will complete throughout the course.

Reviews

len1672617

10/9/2017 2:57:20 AM

Submit to Web-CAT - Project 2 is worth 50 points. 30 points will be from correctness of your code and coverage of your tests on Web-CAT, 10 will be based on Web-CAT's style guides, and 10 points will be given from the grader for who will ensure that your code meets the project requirements. Notes on Scroll Methods - A few notes on these methods: A primary method is one that is implemented in a concrete class using the private instance variables that make up the representation. A secondary method is one that is implemented using only primary methods - it does not use the representation. Secondary methods can be implemented in an abstract class; primary methods cannot. The reverse method requires that the cursor be at the beginning of the scroll before the call. It will end up at the end of the scroll after the call.

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