32,199 Topics
| |
Draw a flowchart and write the pseudocode to represent the logic for a program that will open two files, input and output. | |
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 … | |
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? | |
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 … | |
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}); } | |
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 :) | |
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 … | |
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 … | |
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... | |
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? … | |
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 … | |
how to reverse words in a sentence without using split or string tokenizer. I/p :- how are you O/p :- you are how | |
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 … | |
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 … | |
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. | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.