Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
~4K People Reached
Favorite Forums
Favorite Tags
java x 18
c++ x 6
oop x 2

17 Posted Topics

Member Avatar for redtribal23

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

Member Avatar for tinstaafl
0
210
Member Avatar for redtribal23

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 = …

Member Avatar for David W
0
549
Member Avatar for redtribal23

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; …

Member Avatar for deceptikon
0
165
Member Avatar for redtribal23

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]);

Member Avatar for vivekH
0
255
Member Avatar for redtribal23

Is there a way to calculate large numbers without using BigInteger? I am calculating an exponent without using the math class.

Member Avatar for cool_zephyr
0
86
Member Avatar for redtribal23

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 …

Member Avatar for JamesCherrill
0
110
Member Avatar for redtribal23

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 …

Member Avatar for Taywin
0
193
Member Avatar for redtribal23

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 …

Member Avatar for redtribal23
0
149
Member Avatar for redtribal23

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. …

Member Avatar for Taywin
0
216
Member Avatar for redtribal23

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 …

Member Avatar for stultuske
0
566
Member Avatar for divinity02

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

Member Avatar for divinity02
0
208
Member Avatar for redtribal23

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 …

Member Avatar for redtribal23
0
208
Member Avatar for redtribal23

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 …

Member Avatar for stultuske
0
204
Member Avatar for divinity02

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"); }

Member Avatar for stultuske
0
148
Member Avatar for divinity02

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 …

Member Avatar for redtribal23
0
254
Member Avatar for heather_h56

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){ …

Member Avatar for redtribal23
0
211
Member Avatar for redtribal23

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 …

Member Avatar for Tarek_2
0
357

The End.