Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write code public class Steps 1/ Instance variables private int value; 1/ Constructor public Steps(int value) { 1 this.value = value; -2 } 3 B

image text in transcribed write code
image text in transcribed
public class Steps 1/ Instance variables private int value; 1/ Constructor public Steps(int value) { 1 this.value = value; -2 } 3 B 24 26 27 28 public int getValue() { // TODO Add your own code here to get the value of this object (the number of steps) } public void setValue(int newValue) { 1/ TODO Add your own code here to set the the value for this object (the number of steps) 29 3e 31 32 33 34 351 36 37 public String toString() { // TODO Add your own code here to display the contents of this steps object } I 9 public class TestSteps { 10 11 @Test 12 public void testGetValue() { 13 Steps s = new Steps (20); 14 assertEquals(20, s.getValue()); 15 1/assertEquals(20, s.getValue()); 16 } 17 18 @Test 19 public void testToString() { 20 Steps s = new Steps (17); 21 assert True(s.toString().contains (String.valueOf(17))); 22 } 23 24 ] 25 NNNN in NN00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions