Results 1 to 20 of 20
Thread: help with basic code!!!
- 10-06-2012, 01:57 PM #1
Member
- Join Date
- Oct 2012
- Posts
- 11
- Rep Power
- 0
help with basic code!!!
Hi I'm new to java....first year college student and have an assignment to do. Really need help with this as I can't get it right. The assignment is below, any help on how to write this code from start to finish would be great
Exercise 4.
BigBurgers Ltd require a program to calculate their profit on hamburgers and chips each day.
A portion of chips cost the company 30p and sells at 75p.
A hamburger costs 40p and sells at 95p.
Input to the program is the number of hamburgers and the number of portions of chips sold.
Output is the profit on hamburgers, the profit on chips and the total profit.
Follow the usual design code and test steps.
- 10-06-2012, 02:00 PM #2
Senior Member
- Join Date
- Oct 2011
- Location
- Sweden
- Posts
- 123
- Rep Power
- 0
Re: help with basic code!!!
Hey!
No one here will write the code for you, since you should be able to do it yourself when you are done with the assignment. Why are you taking a course if you don't want to learn how to code? ;)
First, write down what type of calculations you need to do.
Second, what do you need your program to do? It seems to me that you only have to input how many burgers and portions of chips that are sold, let the program calculate it and then print it out to the console.
What "the usual design code and test steps" are I cannot answer you. If you have access to certain course literature, use it.
What you need to know for this assignment is:
How to make simple calculations in Java.
How to take inputs from the console.
How to write to the console.
Good luck!
-
Re: help with basic code!!!
Please have a look at this site So, You Need to Write a Program but Don't Know How to Start for tips on how to get started. Please feel free to come back with your code attempt if you have any specific answerable questions and we'll be more than happy to help you.
- 10-06-2012, 02:10 PM #4
Member
- Join Date
- Oct 2012
- Posts
- 11
- Rep Power
- 0
Re: help with basic code!!!
I don't want them to write the code for me I am only starting, of course I want to learn that's why I am taking it
but what i am trying to say is I need to shown step by step first and I was not given that opportunity. Believe me I have
asked the tutor for help as I am really struggling. I just don't understand the language if I knew that I could manage.
Thanks for your reply though.
- 10-06-2012, 02:12 PM #5
Member
- Join Date
- Oct 2012
- Posts
- 11
- Rep Power
- 0
Re: help with basic code!!!
Thank you I am just starting and am under so much pressure, I just need the basics
- 10-06-2012, 02:16 PM #6
Member
- Join Date
- Oct 2012
- Posts
- 11
- Rep Power
- 0
Re: help with basic code!!!
Thank you
-
Re: help with basic code!!!
- 10-06-2012, 02:42 PM #8
Member
- Join Date
- Oct 2012
- Posts
- 11
- Rep Power
- 0
Re: help with basic code!!!
just want to get this straight it's not a home work dump, I am new to this I don't know where to start.
I have tried to work it out several times and am still trying, and I will keep trying until I get it I just have to get
the steps right. Thanks
- 10-06-2012, 02:43 PM #9
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
Re: help with basic code!!!
Do you know how to add, subtract or multiply two numbers in Java and print the result?
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 10-06-2012, 02:48 PM #10
Member
- Join Date
- Oct 2012
- Posts
- 11
- Rep Power
- 0
Re: help with basic code!!!
To be honest No Jos, I know nothing about it I find it very hard, Its only my second week in college and got a CA to do.
I never used Java before last week.
- 10-06-2012, 03:11 PM #11
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
Re: help with basic code!!!
Well, check you text book; you'll find a class in there with a main( ... ) method; copy that stuff to your own .java file but keep the body of that main( ... ) method empty; you have an (almost) empty class with a single (empty) method. You have to create the body of that method. Play with it a bit, try to compile and run what you did and see what happens; no need to worry, nothing explodes ;-)
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
-
Re: help with basic code!!!
Also, if you're completely, totally and utterly lost, get a tutor for intense one on one face to face tutoring. Pay if you have to. This forum is no substitute for that.
- 10-06-2012, 03:39 PM #13
Member
- Join Date
- Oct 2012
- Posts
- 11
- Rep Power
- 0
Re: help with basic code!!!
thanks Jos appreciate it
- 10-06-2012, 03:41 PM #14
Member
- Join Date
- Oct 2012
- Posts
- 11
- Rep Power
- 0
Re: help with basic code!!!
I think you have me misunderstood Fubarable, I don't want you to be my teacher, were you never stuck before?
-
Re: help with basic code!!!
Yes, I've been stuck, but you're not stuck; to blunt you're completely lost. You're starting out and don't understand a thing about Java yet. Don't get me wrong, there's nothing wrong with that, as none of us are born with Java knowledge, but you must understand that a forum is not going to be able to help you at this stage. You first have to gain some basic understanding from your books, tutorials, lessons, ... enough to be able to formulate a specific question. If you're failing at even that, then you need one-on-one tutoring. Sorry, but that's how I see it.
- 10-06-2012, 03:51 PM #16
Member
- Join Date
- Oct 2012
- Posts
- 11
- Rep Power
- 0
Re: help with basic code!!!
No problem with that I am going through my books, and trying to get that understanding.
I just thought you were being a bit arrogant.
I have just booked some one to one lessons on-line so hope this will help me, Thanks
-
Re: help with basic code!!!
Good. Continued intense study will help. Also write lots and lots of code. Don't worry if its wrong to start with as the fixing of errors will help you learn the language.
Sorry if I gave that impression.I just thought you were being a bit arrogant.
Great, and best of luck!I have just booked some one to one lessons on-line so hope this will help me, Thanks
- 10-06-2012, 04:08 PM #18
Member
- Join Date
- Oct 2012
- Posts
- 11
- Rep Power
- 0
Re: help with basic code!!!
Thanks again
-
Re: help with basic code!!!
Code deleted. penguinCoder please do not spoon-feed solutions. By doing this you cheat the original poster out of a chance to "practice practice practice". Please no more of this here.
Originally Posted by penguinCoder
- 10-06-2012, 11:36 PM #20
Member
- Join Date
- Oct 2012
- Posts
- 4
- Rep Power
- 0
Re: help with basic code!!!
If you're really lost i'd recommend CodeMonkeyCharlie's youtube tutorials, they got me a pretty good start.
He has 17 video's between 5 and 15 minutes each to cover all the basics.
It might not be what you're looking for, for your assignment but I found it a great start into Java.
I would post the link but i'm not sure if thats allowed!
Similar Threads
-
need help with my basic java calculator code
By hashey100 in forum New To JavaReplies: 3Last Post: 11-12-2011, 04:48 PM -
Basic Java Calculator Code Problem
By SerbianSergeant in forum New To JavaReplies: 7Last Post: 07-22-2011, 01:50 PM -
very basic code
By BlueJ2008 in forum New To JavaReplies: 1Last Post: 10-14-2008, 01:40 PM -
help with basic java code
By elizabeth in forum New To JavaReplies: 1Last Post: 08-07-2007, 06:47 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks