- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
17 Posted Topics
I need help finding a bug in my program. Whenever I run it it keeps saying Debug Assertion Failed. Expression:_block_type_is_valid(phead- nblockuse). Here's the code: http://pastebin.com/0vVciqZS | |
I am trying to do a deck of cards in linear form so that I would be able to tell if I am guessing the right card. The program should be able to tell if the guess is getting closer or not. I made a random number generator (randomNum = … | |
InputFile.txt Bea Sanchez Junior Math OPS HIGH 17 90 Nicole Sanchez Freshman Science OCC HIGH 13 98 Billy Cruz Senior English OPS HIGH 17 80 #include <iostream> #include <string>; #include <fstream> using namespace std; struct StudentNode{ string firstName; string lastName; string gradeYear; string subject; string schoolName; int age; int grade; … | |
Why this doesn't work? class Faculty extends Employee { private long[] officeHours; private String rank; public Faculty(long[] hours, String rank) { this.officeHours = hours; this.rank = rank; } public static void main(String[] args){ //some code here Faculty f = new Faculty(newToken[], tokens[tokens.length-1]); | |
Is there a way to calculate large numbers without using BigInteger? I am calculating an exponent without using the math class. | |
I am trying to convert my code into generic and I get an error at o1 + o2 stating that cannot find symbol for o1 and o2 then bad operand types for binary operator on the push(pop()+ pop()). public abstract class MyStackGeneric <E> extends ArrayList <E> { protected abstract E … | |
I am trying to read a line of numbers in string datatype then parse them into double before reading the next line. I get a nullpointerexception. I am trying to read numbers 4 5 2 first, parse them to double, then do some other calculations before going to the second … | |
Okay so first is I am confused with the void function. It is said that void function does not return a value. If for example I have a void function that gets user input, like price and month, how do I use price and month to do another function? int … | |
I'm trying to make a program that reads in numbers and commands and prints the list of numbers. I am trying to solve one problem at a time and this is about exception handling. I am still not familiar with the whole exception handling that is why I get confused. … | |
the program works the way i want it to except for the inputmismatchexception. import java.io.File; import java.io.IOException; import java.util.Arrays; import java.util.InputMismatchException; import java.util.Scanner; public class Exception { public static void main(String[] args) throws IOException { int num = 100; int tempNum; int index; String[] strArray = new String[num]; int[] numArray … | |
Re: if you want the age and new salary output in the end then take all your outputs outside the if and else statement. also, if you don't have anything else to check, just use else not else if | |
I have a txt file with 5 integers, then from standard input if I entered 1 it will output 10 if I entered 3 it will output 30. I put mine in an array, I just want to know if its possible to not put it in an array and … | |
Please help in understanding the requirements. This is how I understand it, first, from standard input (I'm will need to use Scanner) read in 100 integers. 2nd, put all the 100 integers in a file (using printwriter in my case) 3rd, use that file to catch the exceptions (ArrayIndexOutOfBoundsException) Write … | |
Re: You have to add the taxable_income after the boolean operator like this if(taxable_income >=100 && taxable_income <=446199) { System.out.println("print taxable_income is nil"); } | |
Re: You can't compare a string with an integer.It's like saying are apples less than 10? because apples does not have any value. You should compare 22 with the user age. Also on line 16 you should be outputting the name of what you entered from the beginning right? So it … | |
Re: You use doubles when doing the average like this int grade; double average; average = grade / 4.0; You will only average the highest 4 grades right? so you make 4 to 4.0 so it becomes a floating-point number. For the if-else do you mean like this? if(average >= 90){ … | |
Below is my queue code. Whenever I enter nos. 1 to 8, it will print 1-7 then replace 8 with 0. If there are any other mistakes in my code please let me know. import java.util.Arrays; import java.util.Scanner; public class Queue { private int[] elements; //integer values from scanner private … |
The End.