32,199 Topics

Member Avatar for
Member Avatar for Megan_7

Draw a flowchart and write the pseudocode to represent the logic for a program that will open two files, input and output.

Member Avatar for stultuske
-3
164
Member Avatar for John_165

Write a program that displays all numbers divisible by 3 and 4 within a range entered by user. Display five numbers per line. Numbers are separated by exactly two spaces. This is my code public class Chapter4 { public static void main(String[] args) { Scanner input = new Scanner(System.in); final …

Member Avatar for JamesCherrill
0
2K
Member Avatar for overwraith

I have a question about the dining philosopher problem. This is not about homework. I seem to have solved it, does it actually relate to anything? Is there any software that actually requires it?

Member Avatar for rproffitt
0
193
Member Avatar for Gl753

I'm working on assignment that requires me to generate and store 50 random PPS Numbers in an array but I'm not sure as to how to go about doing this. Keep in mind that I'm not asking anyone to do this assignment for me, this is just the part I …

Member Avatar for Janko_1
0
3K
Member Avatar for kenneth_12

SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy"); Date date = sdf.parse(d); Calendar cal = GregorianCalendar.getInstance(); cal.setTime(date); for (i=0;x>i;i++){ cal.add(GregorianCalendar.DATE, 7); String t = sdf.format(cal.getTime()); DefaultTableModel model = (DefaultTableModel) jTable1.getModel(); model.addRow(new Object[]{t,c}); }

Member Avatar for Tarek_2
0
446
Member Avatar for alda_1

heyy can anyone please help me with this homework in java because i am new at this Create a program where it should appear in a dialog box your name,last name and the avarage of four exams :)

Member Avatar for Tarek_2
0
300
Member Avatar for divinity02

hi pple I am building this electronic role using an interface. during the course of designing the interface, tried running it just to see the look and feel of it and it is not showing can someone tell me why this happen. here is the code. havent start coding it …

Member Avatar for divinity02
0
2K
Member Avatar for Cj_5

Hi, first timer here so sorry before hand if I forget to mention something. My code run the window fine but when I hit the calculate button I receive an error message. Firstly this is my code package Chapter12; import javax.swing.*; import java.awt.event.*; public class TheaterGUI extends JFrame { JTextField …

Member Avatar for JamesCherrill
0
543
Member Avatar for coroll

Hi, I want to find all the words(scabble words) that can be made out of given set of letters. ex: abnana results: a aa ab an baa ban banana na nab How could i achieve this? Do i need a binary tree? Plz some one help me...

Member Avatar for JamesCherrill
0
2K
Member Avatar for Fen_1

I am working on implementing a binary search tree as an array implementation, but I am having trouble with correctly printing out all of the students' records using the showAll() method and my application also doesn't print out anything for the insert and fetch methods. What am I doing wrong? …

Member Avatar for JamesCherrill
0
401
Member Avatar for Saboor880

HI! I have made an desktop application, which i have to install on my client's pc. But I want that, except that particular cleint's pc, no other pc could run it. For this purpose i got a solution to get mac address of that pc and make a check for …

Member Avatar for stultuske
0
280
Member Avatar for skimmpy

how to reverse words in a sentence without using split or string tokenizer. I/p :- how are you O/p :- you are how

Member Avatar for stultuske
0
5K
Member Avatar for Dietrich_1

So I am confused as to how to generate random integers between a range, in the first one it says to make the range from 0 to n-1 and the precondition is that n has to be greater than 0. For the second import java.util.Random ; /** * This class …

Member Avatar for rproffitt
0
547
Member Avatar for overwraith

I am creating a reporting engine, it is kind of novel. **The only question I have is what are some of the wierder scheduling related things you guys have seen for you cyclical computer programs to date**. I am trying to cover as many fringe cases as I can, and …

Member Avatar for rproffitt
0
294
Member Avatar for aman rathi

Is there any method in java to generate random number (integer, byte or float). please tell me if any i need it in my program. if possible please give full example. thanks.

Member Avatar for stultuske
1
1K
Member Avatar for Mira Kris

Hello there, I'm new to Java programming nd I wan't to learn more from it. May I ask you some tips in creating a Lucky Nine game in Java with AI as the other player. Thank you so much for you help.

Member Avatar for stultuske
0
359
Member Avatar for manisha

Hi, I want to start the command prompt window from my java program. Tried using Runtime but its not working.These are my codes : [code]String command = "cmd.exe"; try { child = Runtime.getRuntime().exec(command); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); }[/code] Actually, its working when i …

Member Avatar for stultuske
0
2K
Member Avatar for Dietrich_1

So I am having trouble knowing what to return in the bottom method any help would be appreciated . Here are the specifications for completing the StringArray class: (a) In the class StringArray write method numInArray,using the method signature below. numInArray should return the number of times the string s …

Member Avatar for JamesCherrill
0
870
Member Avatar for Moksuhd

Hi guys, This is my first post and basically i require some help editing my current code to help display number of students with a mark of 40 or above specifically. And also i am having difficulty generating a average i thought i done it but it remained constant a …

Member Avatar for JamesCherrill
0
444
Member Avatar for SimonIoa

I tried to run an Ionic 3 project from existing files using not C++ but Apache/Cordova and i am getting these errors. Idid a Typescript project works fine. But Cordova won't run with Javascript? Severity Code Description Project File Line Suppression State Error TS2304 Build:Cannot find name 'object'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various …

Member Avatar for SimonIoa
0
1K
Member Avatar for Dietrich_1

So I have a project with a tester that is not displaying what I thought it would display. The project description and everything is as follows: Given an array of integers, how can we make some basic statistical calculations on the data? Specifically, we want to be able to determine …

Member Avatar for hericles
0
11K
Member Avatar for Abdullah_18

hi can you help me please Write a program that breaks a number into its digits. Program keeps prompting the user to enter an integer and displays the digits of that integer until user enters -1 run like that Enter a number (-1 to end): 3457 ↵ Digit1 = 7 …

Member Avatar for pty
0
405
Member Avatar for rahaf_1

Write a program that computes the gold zakat. The user should enter the gold weight in gram and its worth. The program should print and calculate the zakat if the gold is worth 3000 or more. Otherwise, the program should print 0. Hint: zakat = gold worth * 2.5% how …

Member Avatar for rahaf_1
-1
1K
Member Avatar for BananaBread

Hi there. Sorry if this is in the wrong place! I am looking to create an app which allows a user to click on some words from a list (or three) to create a random sentence. What would be the easiest way to do this? I am using Android Studio …

Member Avatar for rubberman
0
363
Member Avatar for overwraith

I am creating an application that uses NHibernate, an object relational mapper that is a port of the Java Object relational mapper hibernate. Currently I am trying to represent my entities via hibernate xml files. The application I have right now is throwing an error I am thinking may be …

Member Avatar for stultuske
0
637
Member Avatar for overwraith

I have the following error as part of my nhibernate project; **Could not find a setter for property '0' in class 'AdHockey.Models.User'** The following is my model; public class User { /// <summary> /// Unique identifier for group used by program and database layer. /// </summary> public virtual int UserId …

Member Avatar for overwraith
0
2K
Member Avatar for random_1

Hello, is it possible to have a multidimensional array of different type? We have to create a simple "joke" application with GUI, and what I was thinking is that for each question a character(image) with a speech bubble asks a question like for example a joke about a banana would …

Member Avatar for JamesCherrill
0
269
Member Avatar for Dietrich_1

So I am having trouble with the last bit of the car class, I have to update the number of gallons in the car based on the number of miles driven... public class Car { private double mpg; private double mileage; private double tankCapacity; private double gasInTank; /** Constructs a …

Member Avatar for JamesCherrill
0
880
Member Avatar for Dietrich_1

Alright so I have a tester for this class and it keeps saying this message: "Now testing your drive method: *** A car with mileage of 700 miles driving 400 miles before running out of gas should not now have mileage of 1700.0 miles" However when I remove the mileage …

Member Avatar for stultuske
0
423
Member Avatar for Dietrich_1

So I am simplifying fractions for my fractions class and I am having trouble with the euclidian code for the gcd, it also doesn't print to the console window it just runs and nothing happens: public class GCD { public static void main(String[]args) { int n = 5 ; int …

Member Avatar for tinstaafl
0
184

The End.