Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~6K People Reached
Favorite Tags
Member Avatar for Valiantangel

Hi I know couple of programming languages. I have been juggling for months with the question, if its worth taking a Cert in Android application development and /or IOS application development. I have asked around and got responses such as its a fad, tech will change in a few years …

Member Avatar for peter_budo
0
207
Member Avatar for Valiantangel

Hey guys i am struggling a bit with Jframe.Pretty new to JFrame. I hav a file in Picture class and need to bring the BufferedImage to the DrawingImageControlPanel.How do i do this. I know the template for doing this is as stated below. public class ClassName extends JPanel { instance …

Member Avatar for NormR1
0
178
Member Avatar for Valiantangel

I understand overloading but what does someone mean by "Overload the increaseRed method with an increaseRed method that accepts a number that specifies an increase factor"? The increasedRed() is as follows: public void increaseRed() { Pixel[] pixelArray = this.getPixels(); Pixel pixel = null; int value = 0; int index = …

Member Avatar for stultuske
0
126
Member Avatar for Valiantangel

hi my complier showing me that i am having 4 errors.In **t1.drawHexagon(int width)**; & **t1.drawPentagon( int width )**.Its says .class and ";" expected. Help. Thank you import java.util.*; import java.awt.*; public class Turtle extends SimpleTurtle { public Turtle (int x, int y, Picture picture) { super(x,y,picture); } public Turtle (int …

Member Avatar for corby
0
133
Member Avatar for Valiantangel

Hey after all the fuss about Composition and inheritance and drilling in the fact that Composition is superior,I dont understand why the need to know ploymorphism?Since it is gotten through inheritance.Is this a joke? Whats the industry practice?Are they use **widely**?

Member Avatar for stultuske
0
94
Member Avatar for javabegginer

Hello, I just needed some help with a code error. When I compile the code below, I keep getting this error: Program2.java:12: error: ';' expected Scanner keyboard = new Scanner(System.in); 1 error Could somebody please let me know what I am doing wrong? Thanks. import java.util.Scanner; // Needed for Scanner …

Member Avatar for poojavb
0
276
Member Avatar for Valiantangel

Can anyone correct my mistake. Provided code: public void testSetBaseSalaryNegative() { final double altBaseSalary = -999.99; try { emp.setBaseSalary(altBaseSalary); // Expecting an IllegalArgumentException fail ("Negative base-salary values should be rejected by setBaseSalary and result in an IllegalArgumentException"); } catch (IllegalArgumentException ex) { // This is the nominal case } catch …

Member Avatar for JamesCherrill
0
93
Member Avatar for Valiantangel

How can i implement this constructor? I tried replacing commissionEmployee = new CommissionEmployee with this but the complier asked me to create another constructor. public class BasePlusCommissionEmployeeComposition { private double baseSalary; private CommissionEmployee commissionEmployee; // six-argument constructor public BasePlusCommissionEmployeeComposition( String first, String last, String ssn, double sales, double rate, double …

Member Avatar for JamesCherrill
0
204
Member Avatar for Valiantangel

Hi, What is for ( : ) in java.i know what a loop is but lately when i am doing excercises these keep coming up Example:** for(Field currentField : emp.getClass().getDeclaredFields())**

Member Avatar for JamesCherrill
0
136
Member Avatar for Valiantangel

In my Class IntegerSet i hav declared the below method but its not printing when i ran the test public static IntegerSet union(IntegerSet setA, IntegerSet setB){ IntegerSet u = new IntegerSet(); for (int i=0;i <= CAPACITY; i++) if (a[i]==true || setB.a[i]==true) u.a[i]=true; return u; In Testing in main, `System.out.println("The union …

Member Avatar for JamesCherrill
0
130
Member Avatar for Valiantangel

I am getting the following error,"The static field IntegerSet.a should be accessed in a static way" `public static IntegerSet union(IntegerSet setA, IntegerSet setB){ IntegerSet u = new IntegerSet(); for (int i=0;i <= CAPACITY; i++) if (a[i]==true || setB.a[i]==true)// u.a[i]=true; return u; My Class is as followed: public class IntegerSet { …

Member Avatar for JamesCherrill
0
351
Member Avatar for Valiantangel

1.Create class IntegerSet. Each IntegerSet object can hold integers in the range 0-100. The set is represented by an array of bools. Array element a[ i ] is true if integer i is in the set. Array element a[ j ] is false if integer j is not in the …

Member Avatar for JamesCherrill
0
844
Member Avatar for Valiantangel

Just need some understanding on the various Prime number calculations.Please explain 1. verify by brute force that a number is evenly divisible only by 1 and itself.(dont implement the Sieve of Eratosthenes algorithm) 2. writing and running the program with upper limits of n/2 and the square root of n. …

Member Avatar for TrustyTony
0
119
Member Avatar for Valiantangel

double a [3]={1.1,2.2,3.3}; cout<<a[0]<<" "<<a[1]<<" "<<a[2]<<endl; a[1]=a[2]; cout<<a[0]<<" "<<a[1]<<" "<<a[2]<<endl; ans to the above is 1.1 2.2 3.3 1.1 3.3 3.3 I am new to array. Please expalin why a[1]=a[2] gave me 3.3 3.3. thank you

Member Avatar for jaskij
0
93
Member Avatar for Valiantangel

Hi my codes works fine.When i key in ,for example, asdf 546,(f and 5 is separated by space), the programe rightly take it as invalid input ,however it takes asdf and 546 as separate type and return two "Invalid input".See below. I hav no clue why it does that oher …

Member Avatar for Valiantangel
0
125
Member Avatar for Valiantangel

Hi i came up with the following code for my Assignment.It works.What i dont understand was the following code, the rest of the code i did myself. if ( value == 1 ) smallest = randomNum; Why do i need to assign value to 1? Rest of my codes System.out.println("How …

Member Avatar for Valiantangel
0
83
Member Avatar for Valiantangel

I hav this code here that prompt me for only 1 randomNum.I know i need a second loop.how can i go about doing it public static void main(String[] args) { int ii=0; int value; int randomNum; System.out.println("How many integers shall we compare? (Enter a positive integer):"); ii = input.nextInt(); randomNum …

Member Avatar for prnjn
0
119
Member Avatar for Valiantangel

Hi i am finding this a challenge.I am suppose to get 12345 12345 but my below code is giving me 1112314151 1222324252 what mistake am i making? #include <iostream> using namespace std; int main() { int row,column; for(row=1;row < 3;row++) { for(column=1 ;column < 6; column++) cout <<column<< row <<' …

Member Avatar for MandrewP
0
117
Member Avatar for Valiantangel

i was learning about Functions from a book.Keyed in the following code to my visual studio express and got two errors: expect a declaration and '{' : missing function header(old-style formal list. what do they mean? Does this have to do with ans/isoi std? #include <iostream> using namespace std; void …

Member Avatar for Valiantangel
0
95
Member Avatar for Valiantangel

I was reading a book and it said "Mac names cannot be overloaded and the macro preprossor cannot handle recursive calls: #define PRINT (a,b)cout<<(a)<<(b) #define PRINT (a,b,c) cout<<(a)<<(b)<<(c) /*trouble?:redefines,does not overload*/ Can someone pls explain possibliy with examples?

Member Avatar for Valiantangel
0
116
Member Avatar for Valiantangel

int main() My code works fine...i will be using const later ,hence my variable are capital letters.What i need a little help is when the NUM_VALUE is negative.If i am not wrong its call integer division error.(where one or more operand is negative.How can i avoild this? I inserted under …

Member Avatar for gusano79
0
127
Member Avatar for Valiantangel

how do u convert the below to a 'for' loop? int x = 123456; int y =0; while (x > 0) { y *= 10; y += x % 10; x /= 10;}

Member Avatar for WaltP
0
109
Member Avatar for Valiantangel

Hi, how do i output a list,1-5 of the following factorial? #include <stdio.h> #include <stdlib.h> #define fact 5 int main(void) { int i,result=1; for (i=fact;i>=1;i--) result*=i; printf("factorial of (%d) = %d\n", fact, result); return(EXIT_SUCCESS); }

Member Avatar for TrustyTony
0
89
Member Avatar for Valiantangel

I hav this code below.How can i use Macros , so that i can change at random "-" and " " without searching through the codes? #include <iostream> using namespace std; int main() { int row,col,n; cout<<"Enter an Integer number:\n"; cin>> n; cout<<("Numerical Pattern\n"); for ( row = 1 ; …

Member Avatar for deceptikon
0
117
Member Avatar for Valiantangel

hi i am trying to change an input from upper case to lowercase.I am not getting it right.When i key in say Liverpool or TIGERS it only show l and t respectively. Need assistance #include <iostream> #include <cctype> #include<iostream> using namespace std; int main() { char s; cout<<"Name your favourite …

Member Avatar for triumphost
0
93
Member Avatar for Valiantangel

I am getting an error fors x in the polynomial expression.If i put my cursor it says Expected:a';' Code blocks are created by indenting at least 4 spaces ... and can span multiple lines #include<stdio.h> #include<stdlib.h> int main(void) { double x=2.55; double polynomial=3x^3-5x^2+6; printf("The value of polynomial is %lf\n",polynomial); system("pause"); …

Member Avatar for zeroliken
0
76
Member Avatar for Valiantangel

hi in C if someone says printf(%d,x); is x int and double or just int? I know %d is decimal . Will this be the same for printf(%d,&x);? Also cin>>x.Can x be any arithematic type? Thanks

Member Avatar for Ancient Dragon
0
109
Member Avatar for Valiantangel

Is there any errors here, public static void bash(String s,ing count){ for (ing i= 0;i<count;i++) { System.out.println(s); } }

Member Avatar for gusano79
0
72
Member Avatar for Valiantangel

You can only inherit from one parent class in java. true or false.Why?

Member Avatar for thines01
0
73
Member Avatar for Valiantangel

can anyone see my error? error output error: ';' expected System.out.println((GoldFish)owner.pets[ 9 ]).getAction("*Rat eats alot*" )); ^ owner.pets[ 9 ] = new GoldFish(); Pet BlackMoor = owner.pets[ 9 ]; System.out.println((GoldFish)owner.pets[ 9 ]).getAction("*Rat eats alot*" ));

Member Avatar for michelleradu
0
54