Find an Online Tutor Now

264 Answered Questions for the topic Java



I am having serious trouble with this code I have tried multiple times and failed, please help.

The assignment is to write an application for the Shady Rest Hotel; the program determines the price of a room. Ask the user to choose 1 for a queen bed, 2 for a king, or 3 for a king and a pullout... more


I am having serious trouble with this code I have tried multiple times and failed, please help.

The assignment is to write an application that asks a user to enter three integers. Display them in ascending and descending order.import java.util.Scanner;public class AscendingAndDescending {... more

How to make these 3 classes? (Java)

Class1 Shape-color:StringMethods:+getArea() : double+toString(): String ---> Superclass defines the expected behaviors(public intertace) of all subclasses.Program at the public interface.Class2... more


My assignment is to debug this code, I have submitted code multiple times and cannot get it right. Can you please explain to me what exactly is wrong with this code and how I can fix it?

import java.util.*;public class DebugTwo4{ public static void main(String[] args) { Scanner input = new Scanner(; string costString; double cost; final TAX = 0.06;... more

Create a program similar to this while the output stays the same.

Using a text editor, create a file that contains a list of at least 10 six-digit account numbers. Read in each account number and display whether it is valid. An account number is valid only if the... more

Can somebody please fix the output of date in this code

package filestatistics2;import;import java.util.*;import java.text.*;public class FileStatistics2{ private static Object f; public static void main(String[] args) { ... more

Create two files using any word – processing program or text editor. Write an application that determines whether the two files are located in the same folder. Save the files as

Can anyone please finish this I have a hard time doing it PLEASEpackage samefolder;import java.util.*;import java.text.*;import*;import; public class SameFolder { private... more

heres a cs question

Consider the following code segment, which is intended to find the average of two positive integers, x and x;int y;int sum = x + y;double average = (double) (sum / 2);Which of the following... more

How to make these 4 classes with these information?(java)

Class1 (Person)-name: String-address:StringMethods:+Person(name: String, address : String)+getName():Stringg+getAddress():String+setAddress (address: String) : void+toString():String ---->"name... more


Even/odd values in an array

Write a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither. The input begins with an integer indicating the number of integers... more


leap year methods

A common year in the modern Gregorian calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To account for the difference in time, every 4 years, a leap year... more


Acronyms acronyms

An acronym is a word formed from the initial letters of words in a set phrase. Write a program whose input is a phrase and whose output is an acronym of the input. If a word begins with a lower... more


Count characters - methods

Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in the string.Ex: If the input is:n Mondaythe output is:1Ex: If the... more


Solve the question

Problem: Johnny realized that there are many developers out there who will be pleased if there is a data structure that can store paired-data of int and String (this is what they call key-value... more


Java help with coding

Program that prompts the user for the lengths of the sides of a triangle andcomputes the three angles and area. Assume that the user always enters positive integers. Tocompute the angles, use the... more


java month calendar with days in month ad first sunday input

Write a program that produces a calendar. Your program should output acalendar for a single month, given parameters to specify how many daysin the month and the day of the first Sunday.

How to make a class called time on java with these data informaton:

■Class Time■-second:int = 0 ----> hour:[o, 23]--minute:int = 0 ----> minute: [o, 59]-hour: int=0 -----> second: [e, 59]Methods:-+Time()+Time (second: int, minute: int, hour: int)+getHour):... more

pseudocode in java

Write pseudocode for a recursive method that will calculate the expected value of a decision tree, assuming that all decisions are made by maximizing the expected utility. Your method should return... more

Computer Science - Graphs

I've been given an adjacency matrix and asked to state whether the corresponding graph is undirected or not.How do we say whether a graph is undirected or not simply looking at its adjacency matrix.

Java Messenger Application

Problem Description: Distributed banking application You are required to build an application for Bank of Fiji. The application will allow users to create a bank account and use deposit and... more


java programming

a) Write a method that takes as input a 2-dimensional matrix representing the joint probability distribution over two variables, and returns the marginal probability distribution for either the... more

Whats the answer for these Classes and Objects exercise?(Java)

Question 1: Create a class Circle with data types (radius, colors) and methods getRadius (0, getArea().Question 2: Create a class Car with data types (plateNumber, xLocation, yLocation, speed) and... more


object oriented programming

Draw a class diagram on MS Visio having following scenario and attach screen shot of it,It’s an app in which TeleLogin is a class in which SignIn and SignUp are it subclasses, having... more


Johhny did the method overriding of mA() method in class B as shown below. What exactly did he do wrong?

public class A {public double mA() {// code}}public class B extends A {public int mA() {// code}}


Johhny did the method overriding of mA() method in class B as shown below. What exactly did he do wrong?

public class A {public double mA() {// code}}public abstract class B extends A {public abstract double mA();}
1 3 4 5 6 7 11

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.