Start Discovering Solved Questions and Your Course Assignments
TextBooks Included
Active Tutors
Asked Questions
Answered Questions
1 on which classes does the class integer in the standard library depend2 on which classes does the class rectangle in
consider a cashregister class with methodsgive a reasonable postcondition of the enterpayment method what preconditions
1 look at the methods in the integer class which are static why2 look at the methods in the string class but ignore the
1 ideally a method should have no side effects can you write a program in which no method has a side effect would such
repeat exercise p87 using multiple classes modify the gradebook class so that it collects objects of type student each
classes such as rectangle2ddouble ellipse2ddouble and line2ddouble implement the shape interface the shape interface
1 provide junit test class taxreturntest with three test methods that test different tax situations for the taxreturn
write methodsthat compute the angle between the x-axis and the line joining two points measured in degrees and the
write methodsthat compute the area and the perimeter of the ellipse e add these methods to a class geometry the
1 how does a cast such as bankaccount x differ from a cast of number values such as int x2 the classes
1 using a different measurer object process a set of rectangle objects to find the rectangle with the largest
implement a class quiz that implements the measurable interface a quiz has a score and a letter grade such as b use the
1 what is the difference between the paintcomponent and repaint methods2 what is the difference between a frame and a
1 what information does an action event object carry what additional information does a mouse event object carry2 why
1 what is the difference between an actionevent and a mouseevent2 why does the actionlistener interface have only one
1 what is an event object an event source an event listener2 from a programmers perspective what is the most important
your task is to design a general program for managing board games with two players your program should be flexible
write a method randomshape that randomly generates objects implementing the shape interface some mixture of rectangles
1 change the rectanglecomponent for the animation program in section 910 so that the rectangle bounces off the edges of
write a program that prompts the user to enter the x- and y-positions of the center and a radius using joptionpane
1 write a program that allows the user to specify a circle by typing the radius in a joptionpane and then clicking on
consider the task of writing a program that plays tictactoe against a human opponent a user interface tictactoeui reads
1 in his excellent book on programming programming pearls bentley 2000 jon bentley discusses the solution to a
write a function that converts a phrase into pig latin a word is converted to pig latin by removing the first character
write a function that counts the occurrences of a word in a string the function should return an integer do not assume