Explore BrainMass


Java Class for services offered by a hair-styling salon.

The Curl Up and Dye Salon offers a variety of salon services for its customers. Jane Fields, the owner, has contracted to have you write a program that allows reports to be output, sorted by each type of service offered. Table below shows the various services, service prices, and service times. Service

Java Nearest Neighbor Algorithm

Please assist with a java class named "Topology" that includes methods "NearestNeighbor" and "RandomNeighbor". Given an Array object of type String that may list a variable amount of network client node IDs (2100, 2101 ... 2109, 2110) and their own corresponding Cartesian coordinates (i.e., xPos, yPos), the "NearestNeighbor" me

Java Program: Convert Numerical Grade To Closest Letter Grade

Write a Java program that translates a number into the closest letter grade. For example, the number 2.8 (which might have been the average of several grades) would be converted to B-. Break ties in favor of the better grade; for example, 2.85 should be a B. Any value >= 4.15 should be an A+. Write a class Grade with a method

Java program that translates a letter grade into a number grade.

Write a Java program that translates a letter grade into a number grade. Letter grades are A B C D F, possibly followed by + or -. Their numeric values are 4, 3, 2, 1, and 0. There is no F+ or F-. A + increases the numeric value by 0.3, a - decreases it by 0.3. However, an A+ has the value 4.0. All other inputs have value -1.

Graphical Application that Draws a Spiral

Write a graphical application that draws a spiral, such as the following: Your main class should be called SpiralViewer. Complete the following class in your solution: public class SpiralGenerator { // private implementation . . . /** Creates a spiral generator. @param initialSize the size

Implementing Line Equations In Java

A line in the plane can be specified in various ways: by giving a point (x, y) and a slope m by giving two points (x1, y1), (x2, y2) as an equation in slope-intercept form y = mx + b as an equation x = a if the line is vertical Implement a class Line with four constructors, corresponding to the fou

Java Program for a Mortgage Calculator

Write the program in Java (with a graphical user interface) and have it calculate and display the mortgage payment amount from user input of the amount of the mortgage and the user's selection from a menu of available mortgage loans: - 7 years at 5.35% - 15 years at 5.5% - 30 years at 5.75% Use an array for the mortgage

Writing Programs in Java and C#

1. Write a Java program that reads in 10 integers and displays the biggest and second biggest number from them. For instance, if the input is 2 4 1 2 5 8 9 1 3 2, the output would show 9 and 8. You can choose to use the console for input and output, or to use dialog boxes. Test data in this case is simply a list of inputs

Consider a table B that consists of m integers B [1], B [2] ... B [m].

Consider a table B that consists of m integers B [1], B [2] ... B [m]. Design an algorithm to produce a two-dimensional m x m table C such that each element C[i,j] for i <j contains the sum of the B [i] up to the B [j], that is, (B [i] + B [i +1] + ... + B [j]). The values C[i,j] for i >= j are left unspecified, that is, these c

High-Level Summary: Web Database and Data Warehouse

Prepare a high-level summary of the main requirements to evaluate DBMS products for data warehousing. Suppose you are selling the data warehouse idea to your users. How would you explain to them what multidimensional data analysis is and its advantages? The Data Warehousing project group has invited you to provide an OLAP

Java Solution That Implements a DVD Database

Dear Dr. Yupei Xiong - You helped with the solution of the original Java application to implement a Merchant database, and I am hoping that you can help me update the solution with a new Java application to implement a workout/exercise DVD database, please. I have attached a Java application with 4 functional requirements

Write a Java application that can hold five doubles in an array.

Write a Java application that can hold five doubles in an array, and display the doubles from first to last, and then display the doubles from last to first. Use the following logic for BubbleSort to sort and display the array in sequence. Int comparisonToMake = someNums.length - 1; for (a = 0; a < someNums.length - 1; ++a)

Java FastFood Applications

Write an application that displays a menu of three items in a restaurant as follows: (1) Cheeseburger 4.99 (2) Pepsie 2.00 (3) Chips 0.75 Prompt the user to choose an item using the number (1, 2, or 3) that corresponds to the itme, or to enter 0 to quit the application. After the use rmakes the

Write a Java application that indicates invalid ticket number entries.

Write a Java application that indicates invalid ticket number entries. It prompts a ticket agent to enter a six-digit ticket number. Ticket numbers are designed so that if you drop the last digit of the number, then divide the number by 7, the remainder of the division will be identical to the last dropped digit.

Java Split Linked List Into Two Equal Sublists

See the attachment. Splitting a Linked List into two sublists of almost equal sizes Add the method splitMid to the class LinkedListClass as follows: Public void splitMid(LinkedListClass<T> sublist); // This method splits the given list into two sublists of almost equal sizes // Precondition: The list must exist //Postc

Inheritance and Polymorphism

The class Date was designed to implement the date in a program, but the method setDate and the constructor with parameters do not check whether the date is valid before storing the date in the data members. Rewrite the definitions of the method setDate and the constructor with parameters so that the value of month, day, and year

Create a class named RaceHorse that extends Thread.

Create a class named RaceHorse that extends Thread. Each RaceHorse has a name and a run() method that displays the name 50 times. Write an application that instantiates 5 RaceHorse objects each with different names, executing in their own Thread. The last RaceHorse to finish is the loser. Save the files as and

Pseudocode Program

The distance a vehicle travels can be calculated as follows: Distance = Speed * Time For example, if a train travels 40 miles-per-hour for three hours, the distance traveled is 120 miles. Write a program that asks for the speed of a vehicle (in miles-per-hour) and the number of hours it has traveled. It sh

Java Application for Federal Tax Calculation

Write a Java application to accomplish the following task: Ask users for the past 5 years of federal taxes they have paid, save this data to an array, search for the largest and the smallest amount of tax, and display it to the screen. Use proper data structure to solve programming task.

Java Program

Create an application named Numbers. The Numbers class should have non-static public methods named sum and difference, each taking a pair of int variables as arguments. As you might expect, the sum method should add the two integers and return the sum; the difference method should find the difference between the two integers a

Simple Calculator in JAVA

Write a Java program that can serve as a simple calculator. This calculator keeps track of a single number (of type double) that is called result and that starts out as 0.0. Each cycle allows the user to repeatedly add, subtract, multiply, or divide by a second number. The result of one of these operations becomes the new value

Programming Languages

Explain how different programming languages affect the time it takes to develop a system.

Please explain the errors in the following Java code.

Please explain the errors in the following Java code. // AverageAndSmallest // This program will get three numbers from the user // and determine the smallest number and the average import java.util.Scanner; // Scanner class used for getting user input public class AverageAndSmallest { // The main method that be