Explore BrainMass


Need help with functions in C and C++

Problem: Write a C function that includes the following sequences of statements: x = 21; int x; x =42; Run program and explain the results. Rewrite the same code in C++ and Java. I understand Java: Looks like this; Java: public int myMethod(int x) { x = 21; x = 42; return x; } It will

Simple Java Program

GIVEN THE CODE IN THE ATTACHMENT, develop a test program called CoinCounterTest to test the CoinCounter class. In the test program do the following: 1. Write client code (in the file) to create a CoinCounter object called counter. 2. Write client code to call the print method of counter. 3.

ODBC using Apache Derby

The purpose of this 3 page paper is to discuss Open Database Connectivity (ODBC) using Apache Derby Including strengths and weaknesses Open Database Connectivity (ODBC) is one of the most popular ways today to code a database application. Embedded SQL applications tend to lack interoperatiliby. Applications might have to modif

Airlines Information Management Systems-Requirement for Case Diagrams

I require assistance in finalizing the requirements model for the Airlines Information Management System (AIMS) project. The requirements model need to include use UML case diagrams for the entire AIM system. This includes all three sub-systems: bookings, fleet management and employee management. I also require assistance in

Java Program for Printing Employee Details

I am looking for a java program that allows the user to create a file of employees, address, and phone numbers. Prompt the user to enter the filename, and then prompt the user to enter the employees names and their phone extension numbers. The user should press Control + Z after entering all of the data. The program then display

application program that prompts the user to enter a number

Write an application program that prompts the user to enter a number (a number only, error check for numerals only), subtract 50 from that number, and then declare an array using the calculated size. If you attempt to declare an array whose computed size is a negative, the program should throw an exception. Use a catch block to

Eclipse Based Tools for Apache Derby

Read the article: Eclipse Based Tools for Apache Derby. You will need to download and install the Cloudscape workbench here. Note the plugins mentioned in this article are already included in the version of Eclipse you installed for the module 1 case assignment. 2. Do all of the tasks discussed in the article above. Document

Quality Assurance for Web Services

Carry out a test on web site. Carry out the test and prepare for the report. You should at least test the following aspect of the web site: 1. Compliance with HTML standards 2. Compliance with CSS standards 3. Web accessibility from different browsers 4. Web accessibility for disabilities 5.


1. The amount of space between letters can be specified using the __________ property in a style rule. a. letter-kerning b. letter-leading c. letter-spacing d. letter-buffer 2. When a visitor clicks the submit button on a form, the ______ of each form element is sent. a. lab

A Java Class for Time

Modify class Time2 of Fig. 8.5 to include a tick method that increments the time stored in a Time2 object by one second. Provide method incrementMinute to increment the minute and method incrementHour to increment the hour. The Time2 object should always remain in a consistent state. Write a program that tests the tick method,

.java program

(Rectangle Class) Create a class Rectangle. The class has attributes length and width, each of which defaults to 1. It has methods that calculate the perimeter and the area of the rectangle. It has set and get methods for both length and width. The set methods should verify that length and width are each floating-point numbers l

Rewriting pseudo code using loop structure

Rewrite the following pseudo code segment using loop structure Rewrite the following pseudo code segment using loop structure in the specified languages: K-> (j+13) /27 Loop: If k > 10 the goto out K <- k + 1 I <- 3 * k - 1 Goto loop Out:

Java - How to program a arrays

If you were explaining an array ti a friend who is learning Java. how would you do so? How would you explain how arrays are used? Provide at least one concrete example.

Sequence Diagrams for Java

Draw a sequence diagram showing the following scenario: ? Actor asks TV to turn on ? TV asked Lamp to lower light level ? TV asks Actor which channel to set to ? Actor tells TV to set channel to channel 13

Java Code for NumberFormat Class

Need to add in: The number format in one decimal place to make this to round the average score to one decimal in this program. //////////////////////////////////////////////// import java.util.Scanner; public class TestScoreApp { public static void main(String[] args) { // display operational mess

Programming Exercise

Write a function that includes the following sequence of statements: x = 21; int x; x = 42; I need to run the program in C, C++, and JAVA. If I can get started in one of the languages I will be able to complete the rest. Thanks.

Java Method - removeAll

Write a method, removeAll, that takes three parameters: an array of integers, the length of the array, and an integer, say, removeItem. The method should find and delete all occurrences of removeItem in the array. If the value does not exist or the array is empty, output an appropriate message. (Note that after deleting the elem

Java Class Fraction

Rational fractions are of the form a / b, where a and b are integers and b != 0. In this exercise, by "fractions" we mean rational fractions. Suppose a / b and c / d are fractions. Arithmetic operations on fractions are defined by the following rules: a/b + c/d = (ad + bc) / bd a/b - c/d = (ad - bc) / bd a/b * c/d =

integer value reverse

There is an attachment with this problem. Please review the attachment and conjunction with the problem being posted. The problem is below and currently I am stuck. " Write a method that takes an integer value and returns the number with its digits reversed. For example, given the number 7631, the method should return 136

Creating a Java Inventory Program

I have been collecting golf balls from different courses over the years now. Of right now I have an inventory of over 200 golf balls from different courses. Each golf ball has its own logo (golf course name) My project is to create an inventory of my golf balls; can some one help me with this project? The product is golf ba

GUI Components - Java - JPanel

Declare a subclass of JPanel called MyColorChooser that provides three JSlider objects and three JTextField objects. Each JSlider represents the values from 0 to 255 for the red, green and blue parts of a color. Use these values as the arguments to the Color constructor to create a new Color object. Display the current value of

Java Applets - Floating-Point Numbers

Write an applet that asks the user to enter two floating-point numbers, obtains the numbers from the user and displays the two numbers first and then the larger number followed by the words "is larger" as a string on the applet. If the numbers are equal, the applet should print the message "These numbers are equal." Use the tech

GUI Components - Java - Guess the Number

Write an application that plays "guess the number" as follows: Your application chooses the number to be guessed by selecting an integer at random in the range 1-1000. The application then displays the following in a label: I have a number between 1 and 1000. Can you guess my number? Please enter your first guess. A JText

Java Programming/Mortgage

Please help me create a GUI with 3 JTextField (one for loan amount, one for term, and one for interest rate), one JTextArea (where the monthly payment schedule will be displayed; appended for each month, for all moths; attach a JScrollPane to the JTextArea), one JComboBox (with 3 selections: 7 year at 5.35%, 15 year at 5.5 %, 3

Multi threading - Java

State whether each of the following is true or false. If false, explain why. a) Method sleep does not consume processor time while a thread sleeps. b) Using a Lock guarantees that deadlock cannot occur. c) Once a Lock has been obtained by a thread, the Lock object will not allow another thread to obtain the lock until the f

Java - ListMerge

Write a program that merges two ordered-list objects of integers into a single ordered-list object of integers. Method merge of class ListMerge should receive references to each of the list objects to be merged and return a reference to the merged list object. Tips:

JAVA Programming for a GUI

Modify the Inventory Program by adding a button to the GUI that allows the user to move to the first item, the previous item, the next item, and the last item in the inventory. If the first item is displayed and the user clicks on the Previous button, the last item should display. If the last item is displayed and the user click