Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Andrew Concilio

Ranch Hand
+ Follow
since Jul 23, 2013
Andrew likes ...
Eclipse IDE
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Andrew Concilio

Sorry Bear you are right. I am using eclipse Kepler and windows 7 do you have any suggestions on how to fix the error?
Hi Guys
i wonder if one you senior guys could help me out. initially when i was trying to run a web application it was showing me an HTTP 404 error, after i google the solution i changed the server from "use workspace metadata" to "use tomcat installation" now it is showing me a new error " publishing to tomcat v7.0 server at localhost has encounter a problem" i had tried to google this new error and i am not getting any clear answers. can someone kindly give me step by step the solutions for this error.
Thanks in advance
you mean this?
[code = java]

bla bla bla ....

[/code]

thank you for editing my code! any suggestions as far as getting the answer to my question?
8 years ago
hi
i am using eclipse kepler and tomcat 7 with the below code to get a response from the browser. i get no errors on my code and i organize my imports but when i run the code i get an http 404 error. i restart the server and it goes into the whole motion telling me that "Tomcat v7.0 Server at localhost started and is synchonized" i refresh it and i still get the error. what am i missing?
Thanks


8 years ago
well jasper i was clueless on these 3 questions and i had to guess but this was my rezoning, again as a Jr developer i understand that i still have room to go and learn

question # 1 answer 9 because i was just following the math
question # 2 answer b (performance) because the sentence "When you test a program and ensure that every line of code has been accessed, this basic testing is?:" what i am understanding from this question is "when you test a program is every line of code is working" and if that is the question then the code is performing
question # 3 answer b it just made sence
8 years ago
2. Still not sure what the answer is
3. E is the answer? Cannot access your hard drive ....... ?
8 years ago
hi
i am applying for entry level java positions and some of these companies make you do assessment exams once the test is done you only get the the result of the test and not a breakdown of the questions telling you what was right or what was wrong. 3 questions that got my attention (maybe because i felt that i have to guess) are below can someone kindly confirm if i am right and if not what would it be.
Thanks

1.
Int a=3; int b=0;
Switch (a) {
Case 1:
B = a + 2;
Case 2:
B = a + 3;
Case 3:
B = a + 4;
Case 4:
B = a + 5;
Case 5:
B = a + 6;
default:
B = a * 2;
}
// line A


When you execute the sample code above, what is the value of b when line A is reached?
o 0
o 5
o 6
o 8
o 9

my answer is 9

2.
At a minimum basic Java testing includes:

Functional – have all methods been called?
Procedural have all lines of code been called?
Decisional has every control point been evaluated?
Conditional has every Boolean expression been evaluated?
Performance does the code perform efficiently?

When you test a program and ensure that every line of code has been accessed, this basic testing is:
Regression
Performance
Procedural
Conditional
Functional

my answer is performance


3.
a friend passes along an applet from TrustedSoftware.com that has been signed using a private key, explaining that since the applet is from TrustSoftware.com and has been signed, it would acceptable to allow the applet full access to your hard drive. The email with the applet also contain a public key for you to verify. You verify the signature using the provided public key, and the verification passes.
o Is as trustworthy as TrustedSoftware.com
o Was signed using the private key that matched the provide public key
o Is corrupt and cannot be trusted
o Was not released by TrustedSoftware.com
o Cannot access your hard drive, since you have not registered your public key with Trustedsoftware.com

my answer is b

any help will be appreciated
8 years ago
hi
I was wondering if someone could give me a hand and show me how can I use the util.scanner and hashmaps to assign values to keys get the user type 2 keys and get the return sum of the value of these two keys. for example
A = 1
B = 2
C = 3
D = 4
the user will use util.scanner to type any letter from A to D and the compiled will give him the sum of these letters
your help will be gladlyyyy appreciated.
thanks
8 years ago
good morning
how would I enter quotetations in the system.out.print for example I am trying to type - please enter "A" - if I type the regular System.out.println("please enter "A"") I will get an error and ideas
Thanks
8 years ago
I was thinking about creating a hashmap or a hashtable where the the price of the items will be link to the a,b,c,d etc... and import util.scanner so people could enter the items and have the system add them up. what do you think?
8 years ago
i am not sure how to answer the question I have until Monday to reply
8 years ago
hello
I was given the below code as an interview question can you kindly give me an idea on what would be the best approach to tackle this question.
Thanks

Consider a store where items have prices per unit but also volume
prices. For example, apples may be $1.00 each or 4 for $3.00.

Implement a point-of-sale scanning API that accepts an arbitrary
ordering of products (similar to what would happen at a checkout line)
and then returns the correct total price for an entire shopping cart
based on the per unit prices or the volume prices as applicable.

Here are the products listed by code and the prices to use (there is
no sales tax):
Product Code | Price
--------------------
A | $2.00 each or 4 for $7.00
B | $12.00
C | $1.25 or $6 for a six pack
D | $0.15

There should be a top level point of sale terminal service object that
looks something like the pseudo-code below. You are free to design and
implement the rest of the code however you wish, including how you
specify the prices in the system:

terminal.setPricing(...)
terminal.scan("A")
terminal.scan("C")
... etc.
result = terminal.total

Here are the minimal inputs you should use for your test cases. These
test cases must be shown to work in your program:

Scan these items in this order: ABCDABAA; Verify the total price is $32.40.
Scan these items in this order: CCCCCCC; Verify the total price is $7.25.
Scan these items in this order: ABCD; Verify t
8 years ago
tim let me give you the picture
after 10 years working in finance/banking i am switching careers. i worked for this company 7 years ago now i applied for an entry level java developer i passed the phone interview,i the manager said that besides the usual hr people i will be given a code problem. this is the part that is stressing me out because i am trying to get an idea how to prepare so any ideas will be help full
Thanks
8 years ago