Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Software Engineering Expert

1. Answer the following questions for the method search() below:

public static int search (List list, Object element)

// Effects: if list or element is null throw NullPointerException
// else if element is in the list, return an index
// of element in the list; else return -1
// for example, search ([3,3,1], 3) = either 0 or 1
// search ([1,7,5], 2) = -1

Base your answer on the following characteristic partitioning:

Characteristic: Location of element in list

Block 1: element is first entry in list

Block 2: element is last entry in list

Block 3: element is in some position other than first or last

(a) Location of element in list" fails the disjointness property. Give an example thatillustrates this.

(b) Location of element in list" fails the completeness property. Give an example that illustrates this.

(c) Supply one or more new partitions that capture the intent of \Location of e in list" but do not su_er from completeness or disjointness problems.

2. Derive input space partitioning tests for the GenericStackclass with the following method signatures:
_ publicGenericStack ();
_ public void Push (Object X);
_ public Object Pop ();
_ publicbooleanIsEmt ();

Assume the usual semantics for the stack. Try to keep your partitioning simple, choose a small number of partitions and blocks.
(a) Define characteristics of inputs
(b) Partition the characteristics into blocks
(c) Define values for the blocks

3. Answer the following questions for the method intersection() below:
public Set intersection (Set s1, Set s2)
// Effects: If s1 or s2 are null throw NullPointerException
// else return a (non null) Set equal to the intersection
// of Sets s1 and s2
Characteristic: Type of s1
- s1 = null
- s1 = {}
- s1 has at least one element
Characteristic: Relation between s1 and s2
- s1 and s2 represent the same set
- s1 is a subset of s2
- s2 is a subset of s1
- s1 and s2 do not have any elements in common

(a) Does the partition "Type of s1" satisfy the completeness property? If not, give a value for s1 that does not fit in any block.

(b) Does the partition \Type of s1" satisfy the disjointness property? If not, give a value for s1 that _ts in more than one block.

(c) Does the partition \Relation between s1 and s2" satisfy the completeness property? If not, give a pair of values for s1 and s2 that does not _t in any block.

(d) Does the partition \Relation between s1 and s2" satisfy the disjointness property? If not, give a pair of values for s1 and s2 that fits in more than one block.

(e) If the \Base Choice" criterion were applied to the two partitions (exactly as written), how many test requirements would result?

5. Derive input space partitioning tests for the BoundedQueueclass with the following signature:
_ publicBoundedQueue (int capacity);
_ public void Enqueue (Object X);
_ public Object Dequeue ();
_ publicbooleanIsEmpty ();
_ publicbooleanIsFull ();

Assume the usual semantics for a queue with a _xed, maximal capacity. Try to keep your partitioning simple{choose a small number of partitions and blocks.

(a) Identify all of the variables. Don't forget the state variables.

(b) Identify several characteristics that suggest partitions.

(c) Identify the blocks in the partition for each characteristic. Designate one block in each partition as the \Base" block.

(d) De_ne values for the blocks.

(e) De_ne a test set that satis_es Base Choice (BCC) coverage.

Software Engineering, Computer Science

  • Category:- Software Engineering
  • Reference No.:- M91670637
  • Price:- $50

Guranteed 36 Hours Delivery, In Price:- $50

Have any Question?


Related Questions in Software Engineering

Overviewyou are required to modify and logically extend

Overview You are required to modify and logically extend the functionality of a provided code base to implement a game. This requires you to modify the code base as well as create documentation and implement various user ...

Assignment part 1objectives to learn to identify the

Assignment Part 1 Objectives: To learn to identify the relevant use cases for a given application, describe the use cases and develop an object-oriented domain model. Problem Statement - Standing Orders Management System ...

In this assignment you will answer the following questions

In this assignment, you will answer the following questions related to Android platform and Android security design. 1. Describe Android architecture in detail by explaining the four conceptual layers. 2. Describe Androi ...

Instructions - onion routingin this assignment you will

INSTRUCTIONS - ONION ROUTING In this assignment, you will answer the following questions related to Onion Routing and Tor. 1. Describe the infrastructure of Onion Routing and explain how it works for providing anonymity ...

Address the following integrating biblical perspectives

Address the following, integrating biblical perspectives where appropriate: Define a hate crime and describe how white supremacist groups use the Internet to spread their message of hate. Explain why hate crime legislati ...

Write reply to this article with references with apa

Write reply to this article with references with APA bibliography. Hate Crimes Over the past couple of years, hate crimes have been on the rise in America's largest cities. Studies show that there were sharp spikes in th ...

Reply to this article with apa referencehate crimes

Reply to this article with APA reference. Hate crimes According to Merriam-Webster, hate crime is any of various crimes (such as assault or defacement of property) when motivated by hostility to the victim as a member of ...

Proposaldesign of an efficient gps tracking system tag for

Proposal Design of an efficient GPS Tracking System (tag) for monitoring small species IMPLEMENTING EMBEDDED SYSTEMS USING SYSML Task Using PapyrusSysML Software (Downloadable online - Evaluation Copy- Latest Version) Mo ...

Instructionsprivacy-preserving data miningdata mining

INSTRUCTIONS PRIVACY-PRESERVING DATA MINING Data mining technology can be exploited to reveal sensitive information from the original data. Thus it is important to preservethe privacy of the parties that the data refer t ...

Write review on this article with apa formatgovernment

Write review on this article with APA format. Government surveillance is a major issue in the United States and globally. Surveillance refers to any collection and processing of personal data, whether, identifiable or no ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As