Write a test class with test functions

Assignment Help Computer Engineering
Reference no: EM132124407

Requirements

In this assignment, you will implement a lightweight version of an ArrayList class.

You may refer to the Java code and documentation for guidance, but you must write the implementation yourself.

Additionally, you must write unit tests for the class's methods. The use of good style is now a requirement.

Furthermore, you must remain in lab for the entirety of the class period unless you can demonstrate that you have correctly completed the assignment and understand the topics involved.

Design Specifications

You must implement the MyArrayList class with the following public methods.

Constructors MyArrayList(int initialCapacity) MyArrayList() // Required public methods add(E e) add(int index, E element) get(int index) set(int index, E element) size() indexOf(Object o) isEmpty() remove(int index) remove(Object o) contains(Object o)

You must write a test class with test functions for the following public methods (except the constructors):

add(E e) get(int index) size() remove(int index)

Reference no: EM132124407

Questions Cloud

What is the dividend per share in year 7 : (a) What is the dividend per share in year 7? (b) Assume the discount rate is 5%. How much would you pay for a share of Company TYK?
Provide a write up on available routers and switches : Research and provide a write up on available routers and switches. The report should include information for at least two router and two switching devices.
What do we mean by financial intelligence : What do we mean by financial intelligence? How to assess a company's health?
What circumstances will the npv and irr offer different : Under what circumstances will the NPV and IRR offer different recommendations, and which recommendation is preferred?
Write a test class with test functions : You must write a test class with test functions for the following public methods (except the constructors):
Calculate the maturity risk premium : Calculate the maturity risk premium on the 2-year Treasury security
Unbiased expectations theory : If the unbiased expectations theory is correct, what should the current rate be on 3-year Treasury securitie
How file signatures and metadata can be used : What is the major difference in file formats between MS Office 2003 and MS Office 2007 generated files?
What are the risks associated with fixed income security : What are the risks associated with fixed income security. What are possible scenarios that may occur to illustrate the nature of these risks.

Reviews

Write a Review

Computer Engineering Questions & Answers

  What protocol is used by computer connections to internet

What protocol is used by all computer connections to the Internet? What is the form of an IP address? Describe a fully qualified domain name.

  Primary task responsenbspwithin the discussion board area

now that you have defined the quality dimensions you will need to determine which quality process improvement tools

  How the operations work to ensure different aspects

Supplement the description with your own intuitions and analysis of how these operations work to ensure different aspects of secure communication.

  Generalize the program for solving the eight queens problem

Generalize the program for solving the eight queens problem to the n queens problem. Your program should prompt for the value of n and display the solutions.

  Write a method to translate an expression from postfix

Write a method to translate an expression from postfix form into prefix form. Use the C++ conventions of this chapter.

  Questionsome of your friends work on wireless networks and

questionsome of your friends work on wireless networks and theyre at present studying the properties of a network of n

  Draw the windows active directory diagram

Draw the Windows Active Directory diagram and the OES/NetWare NDS diagram that support this company's network structure.

  Call a unary language an arithmetic progression

Call a unary language an arithmetic progression if it is the set {\(x^{m+ni}\)} : i >= 0 for some m and n show that if a unary language is regular , then it is the union of a finite set and a finite number of arithmetic progressions

  Write a one-liner to change the she-bang line

Write a one-liner to change the she-bang line to #!/usr/local/bin/perl in all .pl files in the current directory.

  What is the effective cpi of the given computer

Aerostation uses 1.5 GHZ processor with a claimed 1030-HIPS rating to execute a given program mix. What is the effective CPI of this computer?

  How each can improve system security

Describe the main firewall types and how each can improve system security. What information does a system administrator need to configure a firewall correctly?

  What is the symbol or name being defined here

In order to protect a library's interface file from being included multiple times, we always put in three special preprocessor directives.

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