We want to make a row of bricks that is X meter long. We have a number of small bricks (Y meter each) and big bricks (Z meter each). Return true if it is possible to make the X meter long row by using a combination of the two kinds of brick. Remember, we have to use both kinds of bricks. We basically need you to create a method which takes 3 integer inputs - X, Y, Z and return a boolean as the result.
student_learner
0
Newbie Poster
Recommended Answers
Jump to PostYou just copy/pasted your assignment without even a moment taken to explain what help you need. That's highly disrepestectful to the many people who give their time to help others here.
There are lots of people here who will freely give their time to help you become the best Java …
Jump to Postis the following solution correct?
You can test that for yourself by trying a few small test cases.
However, I think you'll find it's not too good - you may need multiple bricks and nowhere in your code can I see anything to handle that.
The solution may …
All 5 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
student_learner
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
student_learner
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.