I really need help with this so if anyone can help me out that would be really great of you.  
Author Message
adityagaddam90





PostPosted: 2008-2-7 11:08:00 Top

java-programmer, I really need help with this so if anyone can help me out that would be really great of you. On Feb 6, 9:12 pm, Lew <email***@***.com> wrote:
> email***@***.com wrote:
> >> Part II
>
> >> To make a profit a local store marks up the prices of its items by
> >> 25%. Write a Java program that declares the following variables:
> >> 1. a double variable named percent_markedup
> >> 2. a double variable named original_price
> >> 3. a double variable named sales_tax_rate
>
> >> In your program be sure to assign a value to each of the variables 1-3
> >> above. Use initialization for 1 and 2 and for 3.
>
> >> Using the information from above, the program should then output:
> >> 1. the original price of the item
> >> 2. the marked-up percentage of the item (original price times percent
> >> of markup)
> >> 3. the store's selling price of the item
> >> 4. the sales tax rate
> >> 5. the sales tax
> >> 6. the final price of the item (the final price of the item is the
> >> selling price plus the sales tax)
>
> >> can u send me an email or using this to communicate.
>
> Please do not use textspeak in Usenet posts.
>
> A couple of points about your assignment that you will need to know if you
> ever use Java outside of school:
>
> - by long-standing and nearly rigid convention, Java variables are spelled
> without underscores and with mixed case, capitalizing each word part except
> the first, hence "percentMarkedUp".
>
> - doubles work fine as currency values for academic work, but not so much in
> the real world. The issues are somewhat complex, so we stick with doubles
> until we've learned some more of the basics.
>
> Let's review your assignment piece by piece:
>
> >> Write a Java program
>
> I'll give you this part. A "Java program" is a class with a properly-defined
> main() method.
>
> package programming.oneohone;
> public class RetailModel
> {
> public void main( String [] args )
> {
> }
>
> }
> >> that declares the following variables
>
> There are two places you could declare variables so far, within the class
> itself as instance or class variables, or within the main() method. The
> main() method is simpler, so start there.
>
> >> 1. a double variable named percent_markedup
> >> 2. a double variable named original_price
> >> 3. a double variable named sales_tax_rate
>
> Do you know how to declare variables? I'll give you one, focusing in on just
> the main() method and not the rest of the class.
>
> public void main( String [] args )
> {
> double percent_markedup;
> }
>
> It's the same for the others.
>
> >> In your program be sure to assign a value to each of the variables 1-3
> >> above. Use initialization for 1 and 2 and for 3.
>
> Well, the declaration of 1. that I showed you doesn't assign a value, because
> it doesn't have an initialization clause.
>
> Yet.
>
> The tutorial gives a hint near the top of the page about initialization, in
> case you forget the course information:
> <http://java.sun.com/docs/books/tutorial/java/nutsandbolts/variables.html>
>
> So go ahead and modify the declarations you just wrote and add the
> initializations.
>
> Solve one itty-bitty problem at a time, and make sure your program is correct
> at each stage. Only then add in the next piece of the puzzle, one itty-bitty
> problem at a time.
>
> This is beginning to sound a lot like Patricia Shanahan's advice, isn't it?
> You should go back to her link and read it again, very carefully.
>
> Quiz: Where (in what file) do you store the source code for your RetailModel
> program?
>
> General advice: Read the rest of the tutorial, not just the one page I linked
> you to.
>
> --
> Lew

hey Lew thank you soo soo much that instruction by instruction really
helped me a lot and thank you so much again.
 
adityagaddam90





PostPosted: 2008-2-7 11:08:00 Top

java-programmer >> I really need help with this so if anyone can help me out that would be really great of you. On Feb 6, 9:12 pm, Lew <email***@***.com> wrote:
> email***@***.com wrote:
> >> Part II
>
> >> To make a profit a local store marks up the prices of its items by
> >> 25%. Write a Java program that declares the following variables:
> >> 1. a double variable named percent_markedup
> >> 2. a double variable named original_price
> >> 3. a double variable named sales_tax_rate
>
> >> In your program be sure to assign a value to each of the variables 1-3
> >> above. Use initialization for 1 and 2 and for 3.
>
> >> Using the information from above, the program should then output:
> >> 1. the original price of the item
> >> 2. the marked-up percentage of the item (original price times percent
> >> of markup)
> >> 3. the store's selling price of the item
> >> 4. the sales tax rate
> >> 5. the sales tax
> >> 6. the final price of the item (the final price of the item is the
> >> selling price plus the sales tax)
>
> >> can u send me an email or using this to communicate.
>
> Please do not use textspeak in Usenet posts.
>
> A couple of points about your assignment that you will need to know if you
> ever use Java outside of school:
>
> - by long-standing and nearly rigid convention, Java variables are spelled
> without underscores and with mixed case, capitalizing each word part except
> the first, hence "percentMarkedUp".
>
> - doubles work fine as currency values for academic work, but not so much in
> the real world. The issues are somewhat complex, so we stick with doubles
> until we've learned some more of the basics.
>
> Let's review your assignment piece by piece:
>
> >> Write a Java program
>
> I'll give you this part. A "Java program" is a class with a properly-defined
> main() method.
>
> package programming.oneohone;
> public class RetailModel
> {
> public void main( String [] args )
> {
> }
>
> }
> >> that declares the following variables
>
> There are two places you could declare variables so far, within the class
> itself as instance or class variables, or within the main() method. The
> main() method is simpler, so start there.
>
> >> 1. a double variable named percent_markedup
> >> 2. a double variable named original_price
> >> 3. a double variable named sales_tax_rate
>
> Do you know how to declare variables? I'll give you one, focusing in on just
> the main() method and not the rest of the class.
>
> public void main( String [] args )
> {
> double percent_markedup;
> }
>
> It's the same for the others.
>
> >> In your program be sure to assign a value to each of the variables 1-3
> >> above. Use initialization for 1 and 2 and for 3.
>
> Well, the declaration of 1. that I showed you doesn't assign a value, because
> it doesn't have an initialization clause.
>
> Yet.
>
> The tutorial gives a hint near the top of the page about initialization, in
> case you forget the course information:
> <http://java.sun.com/docs/books/tutorial/java/nutsandbolts/variables.html>
>
> So go ahead and modify the declarations you just wrote and add the
> initializations.
>
> Solve one itty-bitty problem at a time, and make sure your program is correct
> at each stage. Only then add in the next piece of the puzzle, one itty-bitty
> problem at a time.
>
> This is beginning to sound a lot like Patricia Shanahan's advice, isn't it?
> You should go back to her link and read it again, very carefully.
>
> Quiz: Where (in what file) do you store the source code for your RetailModel
> program?
>
> General advice: Read the rest of the tutorial, not just the one page I linked
> you to.
>
> --
> Lew

hey Lew thank you soo soo much that instruction by instruction really
helped me a lot and thank you so much again.
 
Lew





PostPosted: 2008-2-7 23:12:00 Top

java-programmer >> I really need help with this so if anyone can help me out that would be really great of you. Stefan Ram wrote:
> GArlington <email***@***.com> writes:
>>> ***
>>> *****
>>> *******
>> The number (and position) of the *s in the above figure seems to be
>> increasing and then reducing at the same rate per step (line) from the
>> minimum (1) to the maximum (7) and then back to minimum (1).
>
> And every line starts with a 禄TAB芦 character:
>
> telnet news 119 | od -c
> article <email***@***.com>
> (...)
> 0003400 w i n g p a t t e r n : \n \n \t
> 0003420 * \n \t * *
> 0003440 * \n \t * * * * * \n
> 0003560 * * * * * * * \n
> 0003500 \t * * * * * \n \t
> 0003520 * * * \n \t * \n \n
> 0003540 P a r t I I \n \n T o m a k e
> (...)
> quit
>
> The rendition of a TAB character depends on the output device.
>
> Sometimes a TAB is converted to eight or another number of
> spaces. Sometimes it is not a fixed value of spaces but a jump
> to a specific position.
>
> Therefore, any program trying to reproduce it, should
> faithfully start each line with a TAB character.
>
> That is, if one reads 禄the following pattern芦 in a sense
> including the indentation.

You took "TAB at the beginning" as a requirement because of an accident of how
the message was posted to Usenet? How can you be sure that the TAB was part
of the original specification and not an artifact introduced by the OP?

--
Lew
 
 
Andreas Leitgeb





PostPosted: 2008-2-8 15:09:00 Top

java-programmer >> I really need help with this so if anyone can help me out that would be really great of you. Lew <email***@***.com> wrote:
> You took "TAB at the beginning" as a requirement because of an accident of how
> the message was posted to Usenet? How can you be sure that the TAB was part
> of the original specification and not an artifact introduced by the OP?

One might tend to speculate that the OP spent no more effort than a direct
copy&paste of the outset...

 
 
Lew





PostPosted: 2008-2-8 15:29:00 Top

java-programmer >> I really need help with this so if anyone can help me out that would be really great of you. Andreas Leitgeb wrote:
> Lew <email***@***.com> wrote:
>> You took "TAB at the beginning" as a requirement because of an accident of how
>> the message was posted to Usenet? How can you be sure that the TAB was part
>> of the original specification and not an artifact introduced by the OP?
>
> One might tend to speculate that the OP spent no more effort than a direct
> copy&paste of the outset...

Key word being "speculate". While we're speculating, let's speculate that the
professor only meant the TAB as white space and not part of the requirement as
such. Given the age and prevalence of this particular exercise, it might even
have been handed out on paper, so the OP's "copy and paste" would have been a
rather laborious process. Quite natural to hit the TAB key as a shortcut in
those circumstances.

Unless the assignment explicitly states, in words, that TABs are a
requirement, it's quite the huge leap to make them into one based on a hex
dump of a Usenet post.

One might speculate...

--
Lew
 
 
Andreas Leitgeb





PostPosted: 2008-2-8 18:33:00 Top

java-programmer >> I really need help with this so if anyone can help me out that would be really great of you. Lew <email***@***.com> wrote:
>> One might tend to speculate that the OP spent no more effort than a direct
>> copy&paste of the outset...
> Key word being "speculate".

This whole thread is probably based on speculation,
like that one's homework might be easier if the net did it :-)

> Given the age and prevalence of this particular exercise, it might even
> have been handed out on paper,...

Don't think so, because merely typing the outset from a paper would have
been more effort than just doing the homework.

> Unless the assignment explicitly states, in words, that TABs are a
> requirement, it's quite the huge leap to make them into one based on a hex
> dump of a Usenet post.

It's not a proof, but let's see if it nudges the scales sufficiently to
persuade the jury not to condemn these poor tab characters, that are yet
at the very beginning of their lines. :-)

 
 
Arne Vajh鴍





PostPosted: 2008-2-11 7:29:00 Top

java-programmer >> I really need help with this so if anyone can help me out that would be really great of you. Gordon Beaton wrote:
> On Wed, 06 Feb 2008 09:37:00 +0100, Wildemar Wildenburger wrote:
>> Without any comment on why you wrote it that way, this is quite
>> dangerous, me thinks. If the OP were to blindly copy and submit it (as
>> many beginners are tempted to), (s)he is bound to get into trouble for
>> it (if the tutors are worth their salt). Which just might discourage
>> her/him, unnecessarily.
>
> There is a long standing Usenet tradition of providing technically
> correct but obfuscated, advanced or otherwise "unlikely" solutions to
> homework questions.
>
> It's something the OP needs to deal with, and is IMO an important part
> of the learning process if he comes here with questions that show a
> complete lack of effort to solve the problem himself.

It is surprising that I have not stopped being amazed over peoples
lack of character.

Tradition is a very bad excuse for doing wrong.

Arne