Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,149,846 members, 7,806,395 topics. Date: Tuesday, 23 April 2024 at 03:43 PM

Java Programmer Help Me Out With This Problem - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Java Programmer Help Me Out With This Problem (821 Views)

Php Programmer Help Me Out ! / Need A Java Programmer To Put Be Through On A JAVA ASSIGNMENT / Functional Programming For Java Programmer Scala Or Clojure? (2) (3) (4)

(1) (Reply) (Go Down)

Java Programmer Help Me Out With This Problem by saemmanuel(m): 9:45am On Jan 04, 2014
Assuming i have:
Skill Level 1 that earn $100 and work for 2hrs
SKill Level 2 that earn $200 and work for 1 hr
Skill level 3 that earn $300 and work for 0.5hr
Now i need a code to predict the best combination of skill worker that can work together to perform a task at a lesser time with a specific amount of money e.g asumming the budget money is $800, the best combination will be 2 skill level 3 and 1 skill level 2 which will work for 2 hrs

Please help out with a code.. thanks
Re: Java Programmer Help Me Out With This Problem by codeaddict(m): 3:16pm On Jan 04, 2014
Re: Java Programmer Help Me Out With This Problem by saemmanuel(m): 9:06pm On Jan 04, 2014
tanks so much
Re: Java Programmer Help Me Out With This Problem by naijaswag1: 12:13am On Jan 05, 2014
Solution
Re: Java Programmer Help Me Out With This Problem by kambo(m): 12:57am On Jan 05, 2014
@codeaddict

directly invoking run= bad style.

"new SkillCost(800).run()" -
Re: Java Programmer Help Me Out With This Problem by dsypha(m): 10:40am On Jan 05, 2014
--
Re: Java Programmer Help Me Out With This Problem by dsypha(m): 10:41am On Jan 05, 2014
@codeaddict, Kambo is right. U shud had used an instance of the thread class or better still an executor. Good work bro, U tried.
Re: Java Programmer Help Me Out With This Problem by codeaddict(m): 11:11am On Jan 05, 2014
dsypha: @codeaddict, Kambo is right. U shud had used an instance of the thread class or better still an executor. Good work bro, U tried.
Guys, cut me some slack. I only use cached thread pools when I'll be running more than one thread, or there's a risk that thread won't complete.
Re: Java Programmer Help Me Out With This Problem by sakalisis(m): 12:22pm On Jan 09, 2014
codeaddict: http://pastebin.com/VSRSdx5c

code eater please i need your email or whatsapp, i will surelly like to learn from you

(1) (Reply)

Text & Video Tutorial On How To Make A Google Clone / Lessons For A Lifetime Of Being A Programmer / Know If Someone Is Hacking Yourcomputer/ Trace A Hacker

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 11
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.