32,199 Topics

Member Avatar for
Member Avatar for Ashvin_3

I came across a KMeans implementation in Java. The number of clusters generated by the code is 3. But when I tried to change it to 2, I am getting the error: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2 Any help is much appreciated. Here is the code: public class KMeans …

0
101
Member Avatar for cyroclasim

this is what i have so far. public class PersonalInformation{ /* =================================================== ===== Challenge 6.1 - Personal Information Class ===== ====================================================== Design a class that holds the following personal data: name, age, and phone number. Write appropriate accessor and mutator methods. Demonstrate the class by writing a program that creates …

Member Avatar for stultuske
0
178
Member Avatar for TwinPlayz

Need help with two classes "Cannonball Component" and "Cannonball" I couldn't figure out the code with the rest but. Feel free to look at code check : http://codecheck.it/codecheck/files?repo=bj4fp&problem=ch06/c06_exp_6_16

Member Avatar for JamesCherrill
1
99
Member Avatar for Tom_46
Member Avatar for MD Nawab
Member Avatar for tawanprp

Hi i'm a beginner in Java. I have school assigment where they want to save employee array to the file and can load it back with replacing the current array in GUI when it hit button save or load. Also, if i want to save or load the array with …

Member Avatar for freesoft_2000
2
153
Member Avatar for Violet_82

I 'm building an application to store and retrieve books, but I have an issue with retrieving data from the db. I'm using REST and testing with postman. Everything works OK. Currently I have a series of methods written in Java at the backend like so @Override @POST @Path("/add") //@Produces("application/json") …

Member Avatar for Smartfitness33
0
403
Member Avatar for rudypooh786

Write a Java application that calculates the number of repayments for a loan based on the initial loan amount, annual interest rate and monthly payment. The user enters these values and application uses a loop to display the balance each month after payment has been made. Note that interest is …

Member Avatar for KAIWEN KEVIN
0
4K
Member Avatar for C_Oleyers

Heres an example since A is a square matrix while B and C is not. The program on my head is a row and a colum counter then if the row and colum is equal to eachother then the system will print out that the A matrix is a square …

Member Avatar for JamesCherrill
0
34
Member Avatar for Tafadzwa_2

JQ is taking a car trip with his family. On the trip, he will stop for fuel, food or lodging. When stopping for gas, JQ will record the amount of fuel he is willing to pay for. When the family stops for lodging, they will also have a meal. JQ …

Member Avatar for rproffitt
0
78
Member Avatar for sovrby

I have an existing text file with a list of book names. I want to read those names & write a second text file with the names of duplicate entries. For example: SamsBookstore.txt might have And Then It's Spring Baby Bear Sees Blue Beach Feet Jimmy the Greatest! Boot & …

Member Avatar for JamesCherrill
0
38
Member Avatar for abdoosh

hello can anybody help me with this issue i have java code to print information that exists in XML file i will paste it here, so i want to print the information based on user input , as example the user enter the Id number then the program should print …

Member Avatar for JamesCherrill
0
149
Member Avatar for j17stella
Member Avatar for MeIDK_

How can i make codes for this? Problems for Program Development 1. Create a java program that will display a menu for choices to perform the following routines: 1. Input a number then determine and display the factors of the number. 2. Input a number then determine and display if …

Member Avatar for rproffitt
0
43
Member Avatar for wasakcabal
Member Avatar for Amr_8

Hiii How are you every one im very happy to be here with all of you & i hopeto enjoy our time togather Thanks :)

Member Avatar for Ariful Arif
2
53
Member Avatar for Allison_5

import random money = 100 Ask user if they want to play or "QUIT" (.upper()) while game != "QUIT": 2 dice generate random numbers 1-6 on each (generate random numbers inside while loop) Every roll cost $3 Win $5 if total is 7 Win $10 for snake eyes Else display …

0
60
Member Avatar for Seema_7

What are the top learning management systems for corporations? And how it helps for employee training?

Member Avatar for rproffitt
0
35
Member Avatar for awfootball7

Hey guys I'm having trouble figuring out how to calculate the standard divination of an array in Java. As you can see I have already calculated the mean, and I know that at the end I will have to divide by the sample size minus 1 (n-1) and square that …

Member Avatar for woo_1
0
18K
Member Avatar for SpotReview

I am writing a Mastermind program in Java. So the user has to enter the number of pegs and colors and a code will randomly be generated and the program will do its thing and tell them if they got the code or not. I have a bunch of IF …

0
73
Member Avatar for Luxiaoxian

def fib(num): if num<=1 return num return fib(num - 1) + (num - 2) num = int(input("enter a number higher than 0: ")) print(fib(i))

Member Avatar for John_165
1
77
Member Avatar for kevlincred

Hi All, I would personally looking for someone from the US for a partnership. This will be something like a part-time job that needs 5 hrs per week. Requirements: US citizenship for legal issues. Basic understanding of technical - Junior Full-stack (web and mobile development) Experience working remotely. Open-minded and …

Member Avatar for rproffitt
0
72
Member Avatar for mspriyya

data1,true,2000,422 data2,false,2001,421 data3,true,2050,427 data4,true,2004,432 the above data is in sample.txt. I want to write a program using a for loop and any filereader class or by any means, such that my output will be stored in as follows: My_Data[1]= data1,true,2000,422 My_Data[1][0]= data1 My_Data[1][1]= true My_Data[1][2]= 2000 My_Data[2]= data2,false,2001,421 My_Data[2][0]= data2 …

Member Avatar for kvprajapati
0
22
Member Avatar for 652yokohoma
Member Avatar for hovig

I want to compute e^x= 1+x/1!+x^2/2!+x^3/3!+...+x^n/n! For any given value of x and n

Member Avatar for rproffitt
0
34
Member Avatar for Saboor880

Hi to all! I am making an android app for a ready made social medial website. Website url is: "www.MixMasala.in" I am using webview for this site, all the functionality working accept two. As this is a social media website it has also audio and video calling option. When I …

Member Avatar for rproffitt
0
1K
Member Avatar for BuhRock

I am writing a program that uses a while loop to determine the largest number input so far. I have to input 10 numbers in whole. At the end of the loop, it should output the largest number. [CODE]import java.util.Scanner; public class Largest { public static void main(String[] args) { …

Member Avatar for JamesCherrill
0
14K
Member Avatar for Arnold Christian

I got a java programming assignment in where you will ask: 1.) Ask the user to input item name, price, quantity and payment. 2.) Store the responses in the computer's memory. 3.) Displaying the item name, total amount and change. ( PS: Still new to this site, want some help …

Member Avatar for JamesCherrill
0
75
Member Avatar for jprog1000

Hello, I have been using the JDoddle online IDE for Java programming: https://www.jdoodle.com/online-java-compiler/ I am unable to increase the font of the Java output terminal. Can that be done? Thank you

0
24
Member Avatar for 240300958_1

The End.