User Profile

Collapse

Profile Sidebar

Collapse
pantherxin
pantherxin
Last Activity: May 21 '10, 02:48 PM
Joined: Apr 8 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I have tried everythink I know, I even switched to something I think is simpler. I think my problem is my return answer when I run this, is a decimal value e.g. enter 400, answer 636.0. I cant figure out how to return an integer or change decimal to integer.
    Code:
    import java.util.Scanner; // program uses class Scanner
    
    public class SalesCommission
    {
    	public static void main( String args[] )
    	{
    ...
    See more | Go to post

    Leave a comment:


  • I have tried everything, even switched to this and still wont print asteriks. I think its because when I run it, the results are numbers with decimal, e.g. enter 400, result 636.0. Cant figure out how to return an integer, as that is what my range is, whole numbers.
    Code:
     import java.util.Scanner; // program uses class Scanner
    
    public class SalesCommission
    {
    	public static void main( String args[] )
    	{
    ...
    See more | Go to post

    Leave a comment:


  • How to display asteriks according to total salary

    Hint at how I can get asteriks to display according to salary ranges?

    Code:
    import java.util.Scanner; // program uses class Scanner
    
    public class SalesCommission
    {
    	public static void main( String args[] )
    	{
            // create Scanner for input from command window
    	    Scanner input = new Scanner( System.in );
    		
    		// declare and initialize array
    		int sales[] = { 0, 0,
    ...
    See more | Go to post

  • pantherxin
    replied to " '.class' expected
    in Java
    Unfortunately, our assignment calls for 200-299, 300-399, etc. I have since tried something that will list the salaries, if I remove " sale = input.nextInt ". However, I cannot enter salaries and complete the other requirements of calculating bonuses. Thanks anyway!
    See more | Go to post

    Leave a comment:


  • pantherxin
    replied to " '.class' expected
    in Java
    Tried ( ) originally and again; got error for that line and additional errors.

    c:\Jassign>java c SalesCommission .java
    SalesCommission .java:16: incompatible types
    found : double
    required: double[]
    sale = input.nextDoubl e();
    ^
    SalesCommission .java:22: incomparable types: double[] and int
    if ( sale == 1000...
    See more | Go to post

    Leave a comment:


  • pantherxin
    started a topic " '.class' expected
    in Java

    " '.class' expected

    I am getting .class expected at debugging for line 16 "sale = input.nextDoubl e[ ]

    Code:
    import java.util.Scanner; // program uses class Scanner
    
    public class SalesCommission
    {
    	public static void main( String args[] )
    	{
            // create Scanner for input from command window
    	    Scanner input = new Scanner( System.in );
    
    		double sale[] = { 200-299,300-399, 400-499, 500-599,
    ...
    See more | Go to post

  • pantherxin
    started a topic Reached End of File
    in Java

    Reached End of File

    getting 1 error that reads-110 reached end of file while parsing


    Code:
    import java.util.Scanner; 110 reached end of file while parsing
    
    public class Christmas
    {
    	// main method begins execution of java appplication
       public static void main( String args[] )
    	{
    	   // create Scanner to obtain input from command window
    	   Scanner input = new Scanner( System.in );
    ...
    See more | Go to post

  • Oh man, I tried something similar i.e. combining two for one method, but as you see from my error I still tried to create invdividual method statements; which sounds crazy just saying it now. Thank you much!
    See more | Go to post

    Leave a comment:


  • Well, I am not trying for an abstract constructor...f or some reason that is the message I am getting along with "method not found" if I apply the semicolons at the noted lines of code (methods); which according to my text, there should not be semicolons, but that is the message I get when I try to compile. Thanks for help anyway.
    See more | Go to post

    Leave a comment:


  • Method not found, or abstract/ or add semicolon errors

    If I put commas after public Invoice ( String number ) and void setPartNumber( String number ) I get error method not found, or abstract with this code. Currently getting error message ";" on these 2/3 lines; didnt include 3rd line with same message.


    Code:
    public class Invoice 
    {
        private String partNumber; // part number for this Invoice
       private int partQty; // part qty for this Invoice
    ...
    See more | Go to post

  • pantherxin
    replied to Convert Integer?
    in Java
    Actually, you led me in the right direction, but this is what I did and program ran;

    System.out.prin t( "Enter radius: " ); // prompt
    radius = input.nextInt() ; // read first entry from user

    Thanks!
    See more | Go to post

    Leave a comment:


  • pantherxin
    started a topic Convert Integer?
    in Java

    Convert Integer?

    Writing program to calculate cir., area, etc. of circle. Radius is input as integer; how to convert integer to proceed with calculations?
    See more | Go to post
No activity results to display
Show More
Working...