Good idea to test a general class with a driver program

Assignment Help JAVA Programming
Reference no: EM13726784

Question 1: Why is it a good idea to test a general class with a driver program before trying to use it?

Question 2: What is the difference between black box and glass box debugging?

Question 3; In pseudo-code, describe CreateTest.java.

Question 4: In pseudo code, describe the driver program that is provided below.

Question 5: If x = 37, y=23, z=-110, r=-32 answer the following questions. Assume that we are working with bytes. To answer thesequestions, you will need to convert from decimal to binary. Remember that System.out.println DOES NOT print binary values. You will need to convert your results to decimal. Of course you can verify your results by computer. Remember that there will be questions like this on the quiz, so try them yourself first.
a. System.out.println(x&y);
b. System.out.println(x^y);
c. System.out.println(~x|y);
d. System.out.println(~x>>2);
e. System.out.println((byte)(z<<(~r>>4)));
f. System.out.println

((byte)(x + (x<<1) + (x<<2) + (x<<3)));
g. System.out.println(y>>>3);
h. System.out.println(x&y|z^r);
i. System.out.println(~x + x);

j. System.out.println(x|(3<<4));

Question 6: In about a sentence, give a reasonable example of when the following operators would be useful when working with strings of bits.
a. or operation (|):
b. and operation (&):
c. exclusive or operation (^):

d. left shift operation: (<<):

Question 7: Suppose we need to create a multiple-choice exam, where each question has four possible choices. Briefly describe (in a few sentences) how we could create a new class that uses inheritance that would allow this. Giving class API and a brief description of the needed methods would also suffice.

Question 8: Suppose we needed to modify the BitMap class to handle a bit stream of up to 16384 bits. Briefly describe the changes necessary to handle this refinement. Can you think of a way that the maximum number of bits to be handled is completely flexible?

Reference no: EM13726784

Questions Cloud

What is the purpose of the term sheet : What is the purpose of the term sheet and why is it important? Be sure to write a detailed long essay to this question. Think about who the term sheet is written for, why it is written, and what does it need to convey.
Describe four changes to traditional 7-eleven supply chain : Describe four changes to the traditional 7-Eleven supply chain that the move to fresh foods will require. In addition, discuss four advantages that 7-Eleven can gain by outsourcing all or most of the fresh food supply chain responsibilities.
Select the primary key from the candidate keys : How do you select the primary key from the candidate keys? How do foreign keys relate to candidate keys? Provide examples from either your workplace or class assignments.
Explain the considerations for leaders of the business : Explain the considerations for leaders of the business you chose in managing the cultural diversity in terms of customer service and employee expectations
Good idea to test a general class with a driver program : Question 1: Why is it a good idea to test a general class with a driver program before trying to use it? Question 2: What is the difference between black box and glass box debugging?
Who determines ethical standards for advertising : Prepare a 15- to 20-slide Microsoft PowerPoint presentation in which you investigate the role of advertising in a culture of consumerism. Who determines ethical standards for advertising
Economic analysis on the at&t offers data privacy : Write economic analysis on the "AT&T Offers Data Privacy - for a Price" -
Can punishment be used as an effective form : Discussion-Punishment Versus Positive Management Techniques, Can punishment be used as an effective form of motivation in the workplace? Why or why not
Assignment related to internet controversy : For this weeks discussion, select an Internet controversy and discuss why this issue is of significance to society. It will be necessary to research the issue before writing. Feel free to take a position on the issue and include arguments to make ..

Reviews

Write a Review

 

JAVA Programming Questions & Answers

  Java programming murach 4th ed 1open the ch06ex1invoice

1.open the ch06ex1invoice project. take a screenshot after you open netbeans and paste it into a word or word

  Traditionally-nutrition programs were targeted to indigent

Traditionally, nutrition programs were targeted to the indigent and poor populations in developing countries. Many of today's Americans are malnourished also, but they are glutted with a wealth of unhealthy foods and require a multidisciplinary appro..

  Working for hypothetical insurance company

Assume that you are working for hypothetical insurance company. This company offers insurance for 4 types of vehicles: cars, trucks, motor cycles and boats. In order to keep the program manageable, we will assume that we do not make a finer distin..

  Write java program to select pine for furniture company

Write down the Java program for the furniture company. Ask user to select P for Pine, O for Oak or M for Mahogany.

  Java write a program that creates a 4 x 6 two-dimensional

Using Java write a program that creates a 4 x 6 two-dimensional array. The program should use loops to populate the array with random numbers between 1 and 100. After the values have populated the array, output the values of the array to the screen i..

  Write a statement to create a jframe object

Write a statement to create a JFrame object with a title of "My GUI Application" - Write a Java statement to have the object from the question above manage its display area by dividing it into 3 rows which have 4 columns each.

  Write a program that displays a frame window w pixels wide

Write a program that displays a frame window W pixels wide and H pixels high. Use the Scanner to enter the values for W and H. The title of the frame is also entered by the user.

  Java program to implement currency converter

Write a JAVA program that helps the user convert currency. The user will enter the amount in Kuwaiti dinars. The program will print the equivalent amount in US dollar and Euros count his change.

  Write a java program that accepts a positive long integer

Write a Java program that accepts a positive long integer between 2 to 15, and then using the number, calculate its factorial (n!). Using do-while statement, make sure it only accepts a valid number (between 2 and 15) - if an invalid number is ent..

  Assessment taskyour task is to develop a java application

assessment taskyour task is to develop a java application that allows the user to read travel booking data from a text

  A client or server prepare to use udp in a java application

How does a client or server prepare to use UDP in a Java application? Are there any differences in what the client does and what the server does?

  Find what kind of output best shows off the operation

Find what kind of output best shows off the operation of these classes, and write a program that produces that kind of output.

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