493 Answered Questions for the topic Java
Java
08/19/22
This question involves an implementation of the class ReviewedProduct that tracks reviews for a product. A ReviewedProduct object is created with one parameter, the product's name (a String).
the ReviewedProduct class provides one constructor and the following four methods
addReview, a void method that takes one integer parameter, the number of stars, and updates the relevant instance...
more
Java
08/19/22
Write a method totient that returns \(\phi(n)\).
By convention, \(\phi(1)=1\) . For \(n \geq 2\), you must use Euler's formula \(\phi(n) = (p_1-1)p_1^{e_1-1} \cdot (p_2-1)p_2^{e_2-1} \dots (p_k-1)p_k^{e_k-1}\) for \(n=p_1^{e_1} \cdot p_2^{e_2}...
more
Java
08/19/22
Help me with this question please it's for java
The totient function \(\phi(n)\) is the count of numbers from \(1\) to \(n\) that are relatively prime with \(n\), that is, have no common divisors with \(n\) except \(1\). For example, 1, 5, 7,...
more
Java
08/02/22
Java Programming
Create an application that will build a diagragh. The user will be prompted for the graph elements using a loop.
User will provide the number of nodes, N
User will provide the connectivity...
more
07/31/22
Your program must define and call the following function. The function should return true if the input year is a leap year and false otherwise. (Java)
A common year in the modern Gregorian Calendar consists of 365 days. In reality, Earth takes longer to rotate around the sun. To account for the difference in time, every 4 years, a leap year takes...
more
Java
06/16/22
Varied amount of input data
Statistics are often calculated with varying amounts of input data. Write a program that takes any number of non-negative integers as input, and outputs the max and average. A negative integer ends...
more
Java
06/16/22
Conver Reverse to Binary
Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in reverse binary. For an integer x, the algorithm is:
As long as x is...
more
Java
06/06/22
Java programming
ip = 11,12,13,14,15,16,17,18,19,20 // as a Stringop11 12 15 13 16 18 14 17 19 20
Java Swing
05/22/22
Why am I getting the error package does not exist?
So I created a GUI in Net-Beans and I'm trying to run it in VS Code and I keep getting this error for all my packages
error: package org.netbeans.lib.awtextra does not exist
...
more
Java
05/14/22
Java Refactoring code
Refactoring questionConsider the following code for 2 classes: Rental and Movie public class Rental { private Movie movie; private int daysRented; public Rental(Movie movie, int...
more
04/26/22
JAVA CODE NEEDS MISSING CODE
This java code below done in java swing has missing code in the TODO sections down below within the code, I need help adding these missing lines please. I have bolded them in the code:import...
more
Java
04/18/22
Java help the full question is below
Write a program that reads a list of integers, and outputs the two smallest integers in the list, in ascending order. The input begins with an integer indicating the number of integers that follow....
more
04/02/22
Java Programming Language
java Programming1. Design a class named Employee_Salary that contains:• A String data field named name representing the name of the employee.• A String data field named position representing the...
more
Java
04/01/22
java Programming
1. Design a class named Employee_Salary that contains:• A String data field named name representing the name of the employee.• A String data field named position representing the position of the...
more
Java
03/28/22
I need a Personal Information Class Design a class that holds personal data
more specificly: name, address, age, and phone number. Demonstrate the class by writing a program that creates three instances of it. One instance should hold your information, and the other two...
more
03/23/22
Introduction to programming help (Java)
A Small supermarket employs workers who are paid every week in hourly bases according to one of the following three rates (depending on their positions). [Postion Type] [Position Name] [Hours Rate...
more
Java
03/08/22
Hi I need help with AddNums in Java
write a function named addNums that takes a string parameter containing a colon-delimited list of 2-digit numbers(ex. 12:21:14), multiplies together the two digits in each number, and computes the...
more
02/26/22
Make 2 classes WrapperShallow and WrapperDeep.
Each class shallow and deep are simply wrapper classes to hold a private array variable. int [] a; The default constructor for each class should initialize “a”. Each class should have a toString()...
more
Java Javascript
02/16/22
NEWTON'S METHOD
1. There is some starting integer number, called S, that we want to find the square root of. (i.e. we want to find S−−√ ) So prompt the user to enter an integer value between 20 and 400 for S. We...
more
Java
02/10/22
Pointers in Java
Does Java supports pointers (from C) for use in it's programming language. The parameters passed by Java is pass by value or pass by reference ?
02/08/22
UNIT 4 LAB CODING
Agile Programming – For Your Family
Describe the cutting-edge program that is referred to as Agile Development. How does it work and what are some of the benefits in a workplace setting?
How does...
more
01/27/22
I don't know how to to code this
Good day. I was hopin if you could help me with this java code that includs a priorityqueue and a scanner. I can't seem to produce an output that make you print the priorityqueue one by one, it...
more
Java
01/26/22
Ans is not matched! all answer in write in incorrect answer
import java.lang.System;import java.lang.String;import java.io.*;import java.util.Scanner;class Que_6{ public static void main(String Args[]) throws IOException { String username =""; String...
more
01/24/22
Please answer the question in description
Assume that the following numbers belonged to an ArrayList called values:5, 23, 45, −3, 17, 18, 100Which of the following would determine how many elements are in values?
a
int numElements =...
more
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.
OR
Find an Online Tutor Now
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.