Results 1 to 7 of 7
  1. #1
    gtorgers is offline Member
    Join Date
    Mar 2014
    Posts
    7
    Rep Power
    0

    Default How do I get this program to run?

    Java Code:
    package com.eclipsedistilled.cis125;
    import java.util.Scanner;
    public class DeskPrice {
    
    	public static void main(String[] args) {
    		// Written by George Torgerson
    		//Chapter 3
    		//Link Logic 7
    		
    		//Rick Hammer 
    		//Desk cost variable
    		
    		//Minimum desk charge is 200
    				
    		//Wood type charge variables
    		
    		int woodType;
    		double customerCharge;
    		final int MAHOGANY;
    		final double CHARGE1=150;
    		final int OAK;
    		final double CHARGE2=125;
    		final int PINE;
    		final double CHARGE3=0;
    		
    		//Surface charge variables
    		final int RANGE=751;
    		final double SURFACECHARGE=50;
    		//length
    		//width
    			
    		// Desk drawer charge variable
    		double deskdrawerCharge;
    		//final int RANGE=9999;
    		final double DRAWERCHARGE=30;
    		
    		//Order number input
    		Scanner input= new Scanner(System.in);
    		System.out.println("Enter desk quantity needed");
    		
    		//Surface area questions for the customer
    		
    		System.out.println("Enter length of desk wanted");
    		
    		
    		System.out.println("Enter width of desk wanted");
    		
    		//Surface area calculation
    		//length*width
    		
    		//Total surface area print out on screen for customer to review
    		
    		System.out.println("The surface area is");
    		
    		//Customer name input
    		
    		
    		System.out.println("Enter full name");
    		
    		
    		
    		
    		
    		// Surface over 750 square inches charge
    		
    				
    
    		//Prompt user to enter wood type
    		
    		
    		//System.out.println("What type of wood would you like your desk made of?" , The three types available are mahogany,oak, and pine);
    		
    		//woodType=input.nextInt();
    		//if(woodType = MAHOGANY)
    			customerCharge=CHARGE1;
    		//else
    			//if(woodType=OAK)
    					//customerCharge=CHARGE2;
    			//else(woodType=PINE)
    						//customerCharge=CHARGE3;
    		
    		//Prompt user to enter amount of desk drawers
    	
    		System.out.println("Enter amount of desk drawers needed");
    		
    		//calculation:Final desk price with all additional charges
    		
    		System.out.println("Your desk price is");
    	}
    
    }
    Write a program that accepts user data for an order number, customer name, length and width of the desk ordered, type of wood, and number of drawers. Display all the entered data and the final price for the desk.
    Last edited by gtorgers; 04-03-2014 at 03:59 AM.

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,813
    Rep Power
    25

    Default Re: How do I get this program to run?

    Can you describe what problems you are having? If there are errors, copy the full text and paste it here.

    Please edit your post and wrap your code with code tags:
    [code]
    YOUR CODE HERE
    [/code]
    to get highlighting and preserve formatting.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    gtorgers is offline Member
    Join Date
    Mar 2014
    Posts
    7
    Rep Power
    0

    Default Re: How do I get this program to run?

    New to this and talking college classes to learn. Will get you the errors later. Thanks for reply so fast. Did I use the code tags correctly? Really don't know what I am doing just using examples to stumble my way through. I am using Eclipse IDE to do this.

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,813
    Rep Power
    25

    Default Re: How do I get this program to run?

    The code tags look good.
    If you don't understand my response, don't ignore it, ask a question.

  5. #5
    gtorgers is offline Member
    Join Date
    Mar 2014
    Posts
    7
    Rep Power
    0

    Default Re: How do I get this program to run?

    Quote Originally Posted by gtorgers View Post
    New to this and talking college classes to learn. Will get you the errors later. Thanks for reply so fast. Did I use the code tags correctly? Really don't know what I am doing just using examples to stumble my way through. I am using Eclipse IDE to do this.
    Here are the parameters: The minimum charge for all desks is 200: need code example for this.
    If the surface (length*width)is over 750 square inches, add $50

  6. #6
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,273
    Rep Power
    6

    Default Re: How do I get this program to run?

    Quote Originally Posted by gtorgers View Post
    Really don't know what I am doing just using examples to stumble my way through.
    I commend you for being honest, but you are on a path to utter failure. Either do it the right way with proper study and experimentation, or pick another thing to study.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  7. #7
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,813
    Rep Power
    25

    Default Re: How do I get this program to run?

    What have you tried? What happened?
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Replies: 6
    Last Post: 12-15-2013, 07:40 AM
  2. Replies: 4
    Last Post: 11-21-2012, 02:19 PM
  3. Replies: 2
    Last Post: 04-02-2011, 01:57 PM
  4. Replies: 13
    Last Post: 03-22-2011, 07:49 AM
  5. changing my program to array working program
    By Chewart in forum New To Java
    Replies: 39
    Last Post: 11-18-2009, 07:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •