Questions on one of my first programs for school

I am taking an intro to Java class and I am in need of some help. I am not looking for anyone to do the work for me just to help me figure out what I am missing and get me back on track.
Here is what the program is I am suppose to write:
Write a Java class that declaires variables to represent the length and width of a room in feet and the price of carpeting per square foot in dollars and cents. Assign appropriate values to the variables. Compute and display, with explanatory text, the cost of carpeting the room.
Here is what I have been able to come up with so far. While it seems to work in the basic idea of what the program is suppose to be I am still not complete in everything I need in it and I am still coming up with errors on just what I have so far.
// File name Carpet
// Created by
// Written 05/12/2009
import java.JOptionpane
import java.util.Scanner;
public class Carpet
    public static void main(String[] args)
        int entry;
        int anotherEntry;
        int carpetEntry;
        Scanner keyBoard = new Scanner(System.in);
            System.out.print("Enter the width ");
// Entry for width of room
            entry = keyBoard.nextInt();
            System.out.print("Enter the length ");
// Entry for length of room
            anotherEntry = keyBoard.nextInt();
            System.out.print(" Length ");
            System.out.println(entry);
            System.out.print(" Width ");
            System.out.println(anotherEntry);
            System.out.println(entry + " times " + anotherEntry + " is " + (entry * anotherEntry));
// Actual square footage of the room being measured
            carpetEntry = keyBoard.nextInt();
            System.out.print(" Enter the carpet price per sq. foot ");
            System.out.println(Carpet Price);
            System.out.println(entry + " times " + anotherEntry + " times " + carpetPrice " is " + (entry * anotherEntry * carpetEntry));
}Any and all ideas tips or pointers would be great. If I am not even close to what its asking please let me know what I am missing or how I am off track. Again I am not looking for anyone to give me the final and end result without me doing the work to actually learn this. Couldnt figure how to post a .zip file so hope how I pasted the code shows up correctly.

Feel free to smack me on the back of the head at anytime HAHA :P
// File name Carpet
// Created by
// Written 05/12/2009
import java.util.Scanner;
public class Carpet
     public static void main(String[] args)
          int legnth;
          int width;
          int carpet;
          Scanner keyBoard = new Scanner(System.in);
               System.out.print("Enter the width ");
// Entry for width of room
               length = keyBoard.nextInt();
               System.out.print("Enter the length ");
// Entry for length of room
               width = keyBoard.nextInt();
               System.out.print(" Length ");
               System.out.println(length);
               System.out.print(" Width ");
               System.out.println(width);
               System.out.println(length + " times " + width + " is " + (length * width));
// Actual square footage of the room being measured
               System.out.print(" Enter the carpet price per sq. foot ");
               carpet = keyBoard.nextInt();
               System.out.println(carpet);
               System.out.println(length + " times " + width + " times " + carpet + " is " + (length * width * carpet));
}Errors:
Carpet.java:15: cannot find symbol
symbol : variable length
location: class Carpet
               length = keyBoard.nextInt();
               ^
Carpet.java:20: cannot find symbol
symbol : variable length
location: class Carpet
               System.out.println(length);
               ^
Carpet.java:23: cannot find symbol
symbol : variable length
location: class Carpet
               System.out.println(length + " times " + width + " is " + (length * width));
               ^
Carpet.java:23: cannot find symbol
symbol : variable length
location: class Carpet
               System.out.println(length + " times " + width + " is " + (length * width));
               ^
Carpet.java:28: cannot find symbol
symbol : variable length
location: class Carpet
               System.out.println(length + " times " + width + " times " + carpet + " is " + (length * width * carpet));
               ^
Carpet.java:28: cannot find symbol
symbol : variable length
location: class Carpet
               System.out.println(length + " times " + width + " times " + carpet + " is " + (length * width * carpet));
               ^
6 errors
----jGRASP wedge2: exit code for process is 1.
----jGRASP: operation complete.

Similar Messages

  • Very large file 1.6 GB..sports program for school. lots of photos, template where media spots saved and dropped photos in..trying to get it to printer swho says its too large but when reduces size loses all quality...HELP??

    Please help...large file my sons Athletic program. Had noto problem with Quality last year..this new printer said file is too large..too many layers, can I FLATTEN..He reduced size and photos look awful. It is 81 pages. Have to have complete before next friday!! Help anyone??

    At that size it sounds like you have inserted lots of photos at too large a size and resolution.
    Especially for a year book style project, first determine your image sizes and crop and fix the resolution to 300 dpi, then drag them into the publication. Pages does not use external references to files and rapidly grows to quite large size unless you trim and size your images before placement.
    Peter

  • I am working on a Veterans Day program for school and I shut down the computer and now I can't get the desktop to load.  It is all a white screen.  What do I need to do, and can I get my video back?

    I am having difficulty getting back on my computer.  I have to have the Veterans Day Program done by next Monday, and it will not boot back up.  All I get is a white screen.  If I push Options and F4 I can get system preferences, but that doesn't seem to do any good.  It was telling me before I shut it down that my Start up menu was full?  What does that mean, and would that be my problem, and how would I fix it?  I would appreciate all the help I can get, I haven't saved anything yet that I was creating.  I have videos of the student singing that I will not be able to do over again.  Please Help!!!
    Thank you!
    Charlene23

    How about in your Applications folder?

  • DJ program for mac besides iTunes

    I have a duel USB ibook here with a 600 MHz processor and 256 mb of ram. I'm looking for some kind of DJ program I can use for this thing. I have 10.4.11 on this thing..I need a DJ program similar to something like Ultra Mixer or djay. It can be a program I have to pay for, or it can be freeware. I know I can use iTunes, but I prefer not to. I'm up for suggestions. Thanks in advance!

    Thank you everyone! First off, I can't use Djay because the minimum system processor is a 1 GHz G4 processor. I have a 600 MHz G3 processor on this ibook. DJay runs because that was one of the first programs I tried. There's like no background, it like infinite. You know that id you have your camera plugged into a tv and you point the camera at the tv? It's just like that. I like that DJay prgram though, just wish it could run on such an old ibook. Thanks for the suggestion christopher!
    Macupdate is a great website, I forgot about it. I'll look for programs in there. Thank you Dave!
    I looked on that Version Tracker, and I could find software, but the thing is that I need some kind of program similar to either "Djay" or "Ultra Mixer" that works with this iBook I have. It has 256 MB or ram, 600 MHz G3 processor, and a hard drive that's about 20 GB with 12 GB left. All the music is already on there though iTunes. I prefer not to use iTunes though. Thank you Chris and thanks for all of your help people!

  • Four yes, no type of questions in one slide

    What I like to do is to put four true-or-false (yes-or-no) type of questions in one slide if possible.
    I achieved this using yes, no widget (I cannot remember where I got it)
    But in this widget, I can just choose yes or no without any feedback.
    But someone frome the top asked me to add feedback on each question.
    Can we achieve this kind of functionality using advance action?
    If possible, I would like to make each question appear one at a time.
    For example, the first question appear. After users select either yes or no, then
    appropriate feedback appear with arrow buttow. If youers click on the arrow button,
    the second yes-or-no question will appear etc. I attached a picture to illustrate my point.
    What is the best practice to achieve this kind of activity? Any advice would be greatly appreciated.

    Lieve is right, whether you are deploying it for LMS or not is vital.
    Also if you like you can insert 8 transparent buttons for i.e. 2 for each section, under button properties if you like you can set Reporting to -- Include in Quiz, a button would by default have Hint, Success Failure caption, enable the one you like, also you can initiate an action to make rest appear once you click arrow.
    This might be a little longer route to achive it, but should work.
    Thanks,
    Anjaneai

  • Ultiboard 12 - one question and one error

    Hello,
    I came back with the same question and one more. First, I installed the demo version NI Design Suite 12 and I want to know, please:
    1. I want know if in Ultiboard 12 I can tuning the length of a net as in Altium Designer software:
    http://www.altium.com/files/pdfs/Tuning-Net-Lengths-Interactively_EN.pdf
    2. I can use "Polygon Splitter" function to cut and polish "Power Plane" ? For example, look in the next image attached below, where I displayed only Copper Top layer.
    So...
    Attachments:
    power plane Ultiboard error.jpg ‏318 KB

    Thanks Tien_P,
    Concerning the second response, I tried to apply the option "Keep out/Keep in area" but every time I applied it and I wanted to cut or crop Power Plane, the option to take due account the default distance between PCB tracks or between the power plane and tracks / pads, and I don't want that (is quite annoying).
    So, when I cut the Power Plane with the option "Keep Out / Keep In Area" I wish they did not take into account the distance between the tracks. And how I can remove "Keep On / Keep Out Area" (suppose that after several uses I would like to remove some keep out/keep In area)?

  • First program on Zed board

    I have just got our Zed board.
    Can you please help me in locating my first program for Zynq w.r.t:
    1- PS section
    2- PL section
    3- Both in communication.
    I just want a minimal design to get into.
     

    Have you tried to just Google "zedboard tutorial" there are tons of tutorials out there. Go to zedboard.org support and look around. You can find some here: Zedboard Tutorials, In the tutorials is a step by step guild to build a simple PS/PL design that interacts with the switches and leds.  If I remember there are two main tutorials, one is bare-metal (don't need to boot Linux) and the other requires Linux up and running via the SD interface.  

  • Dump in smartform driver program for purchase order

    i created one smartform with driver program for purchase order.
    in smartfrom i gave
    form interface: p_ebeln as import,   
                        tables as it_ekpo like ekpo.
    global definitions are
    wa_ekko type ekko for printing the  ekko data in one window,
                                           wa_ekpo type ekpo .
    in main window i took  the  one table and loop the ekpo table for  printing the item details.
    no errors is there.but ; when i call this generated function module to my driver program it goes to dump.
    in driver program i declare structures,internal tables,work areas, and parameter as p_ebeln .
    and also select statements for my table all are good.but its not work.
    in function module i pass the details as export p_ebeln = p_ebeln and table it_ekpo  = it_ekpo.
    and also i done debugging in this data come to the internal table and work areas.
    but it goes to dump.
    if u dont mind plz solve my problem.
    Thanks
    Navya.
    Moderator message: empty lines removed, subject corrected, please use meaningful subject lines when posting!
    Edited by: Thomas Zloch on Mar 24, 2011 10:10 AM

    Hi Navya,
    Your smartform is correct. But, as per my understanding, the dump comes when you call the smartform from the driver program. If that is the case, please check the input parameters and all th parameters in the program should be same as used in samrtform. Any deviation would lead to a dump.
    Analyse and resolve!!!
    Regards
    Atul Sachdeva

  • Program for storing files on application server

    Hi,
    I want to store my csv file on application sever can any one provide me the program for this

    Maya,
    there is no program per se for this ....
    you would need to maintain the directory structure in AL11 and then if required , you can have an FTP program to push the file into that directory. Also please specify your landscape  - are you on Windows / UNIX / AIX / SOLARIS... depending on that you would have to configure your FTP client...
    Arun
    Hope it helps...

  • I want to open ppt or pptx from the web save them as PDFs and take notes on the pdfs for school. All from the ipad, I don't want to have to go back to my computer to e-mail or convert it.

    I want to open ppt or pptx from the web, save them as PDFs, and take notes on the pdfs for school. All from the ipad, I don't want to have to go back to my computer to e-mail or convert it.

    Apple's iWork apps
    http://www.apple.com/iwork/
    3rd party Microsoft equivalent apps
    http://www.polarisoffice.com/en/iOS.asp
    http://itunes.apple.com/sg/app/quickoffice-pro-hd-edit-office/id376212724?mt=8&l s=1
    http://itunes.apple.com/sg/app/office2-hd/id364361728?mt=8&ls=1
    http://itunes.apple.com/sg/app/documents-to-go-premium-office/id317107309?mt=8&l s=1
    http://itunes.apple.com/sg/app/polaris-office/id513188658?mt=8&ls=1
    Others, including cloud based
    Microsoft Office Web Apps:These are versatile apps since they can be used on or off the cloud. Expect a simplified experience to the full version of Microsoft Office suite.
    OnLive: Access both a degree of Windows desktop functionality and full Windows versions of Microsoft Office Suite.
    CloudOn: This was one of the first solutions for iOS productivity. Syncing with Dropbox, CloudOn offers a more complete Windows desktop. The tradeoff is it also offers a more pared-down version of Word, Excel, and PowerPoint.
    rollApp: Offers Open Office programs for iOS, also utilizing Dropbox.
    LogMeIn: Remotely access your home computer's desktop from your iOS device. This solution requires coordination of logins, settings, and hookups. The free version does not offer file transfer, but you can get a separate, free app for that.
    Google Docs: Now featuring Google Drive for iOS, users no longer have to battle with pressing the Refresh periodically to initiate syncing. This makes collaboration much smoother, resulting in a stronger office productivity product.

  • One question about Pricing and Conditions puzzle me for a long time!

    One question about Pricing and Conditions puzzle me for a long time.I take one example to explain my question:
    1-First,my sale order use pricing procedure RVAA01.
    2-Next,the pricing procedure RVAA01 have some condition type,such as EK01(Actual Costs),PR00(Price)....,and so on.
    3-Next,the condition type PR00 define the Access Sequences PR00 as it's Access Sequences.
    4-Next,the Access Sequences PR00 have some Condition tables,such as:
         table 118 : "Empties" Prices (Material-Dependent)
         table 5 : Customer/Material
         table 6 : Price List Type/Currency/Material
         table 4 : Material
    5-Next,I need to maintain Condition tables's Records.Such as the table 5(Customer/Material).I guess the sap would supply one screen for me to input the data of table 5.At this screen,the sap would ask me to select one table,such as table 5.When I select the table 5,the sap would go to the screen to let me input the data of table 5.But when I use the T-CODE VK31 or VK32 to maintain Condition tables's Record,I found it's total different from my guess:
    A-First,I can not found one place for me to open the table,such as table 5,to let me input the data?
    B-Second,For example,when I select the VK31->Discounts/Surcharges->By Customer/Material,the sap show the grid view at the right side.At the each line of the grid view,you need to select the Condition Type at the first field.And this make me confused very much.Why the sap need me to select one Condition Type but not the Condition table?To the normal logic,it ought not to select Condition table but not the Condition Type!
    Dear all,I'm a new one in sd.May be this is a very stupid question.But it did puzzle me for a long time.If any one can  explain this question in detail and let me understand the concept,I will appreciate him/her very much.Thank you.

    Hi,
    You said that you are using the T.codes VK31 or VK32.
    These transaction codes are used to enter condition records for standard condition types. As you can see a grid left side having all the standard condition types like price, discounts, taxes, frieghts.
    Pl check using T.code VK11 OR VK12 (change mode)
    Here you can enter the required condition type, in the intial screen. (like PR00, MWST, K004, K005 .....etc)
    After giving the condition type, press enter or click on Combinations icon on top of the screen. Then you can see all the condition tables which you maintained for that condition type. Like as you said table 118, table 5, table 6 and table 4.
    You can select any table and press enter, then you can go into the screen in which you have all the field cataglogues you maintained for that table. For example you selected combination of Customer/Material (table 5) then after you press enter then you can see customer field on top, and material fields.
    You can give all the required values and save the conditon record.
    Hope this is clear.
    REWARD IF HELPFUL.
    Regards,
    praveen

  • In the middle of the installation processing, this has appeared: "There is a problem with the windows installer package. A program is required for this install to complete could not be run." my question is, what is that specific program?

    in the middle of the installation processing, this has appeared: "There is a problem with the windows installer package. A program is required for this install to complete could not be run." my question is, what is that specific program?

    Let's try the following user tip with that one:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

  • Hi I'm using iPad.i would like to purchase one of my game but I couldn't,because I don't know the answer to the question.like where was your first job and where was your favorite job.would you please help me.thank you

    Hi I'm using iPad.i would like to purchase one of my game but I couldn't,because I don't know the answer to the question.like where was your first job and where was your favorite job.would you please help me.thank you

    See Kappy's great User Tips.
    See my User Tip for some help: Some Solutions for Resetting Forgotten Security Questions: Apple Support Communities https://discussions.apple.com/docs/DOC-4551
    Rescue email address and how to reset Apple ID security questions
    http://support.apple.com/kb/HT5312
    Send Apple an email request for help at: Apple - Support - iTunes Store - Contact Us http://www.apple.com/emea/support/itunes/contact.html
    Call Apple Support in your country: Customer Service: Contacting Apple for support and service http://support.apple.com/kb/HE57
     Cheers, Tom

  • I am trying to run my registered CS6 Design Standard programs for the first time after install. InDesign runs OK, but Illustrator and Photoshop will only run in trail mode. How do I activate those two?

    I can't get my registered versions of CS6 Photoshop and Illustrator to run in full mode. I installed CS6 Design Standard online end of June (an upgrade from CS5.5), on my old MacBook Pro. I didn't run the programs then as I was waiting on arrival of new MacBook Pro. I migrated the programs from my old MacBook to the new, and today tried to run those programs for the first time. InDesign work OK (after an initial hiccup) but Illustrator and Photoshop will only run in trial mode, and won't let me save files. My CS6 Design Standard shows with it's registration in my Adobe Account. All seems in order, but Illustrator and Photoshop won't run in registered mode. Can you please help?

    Demons1 in the future please only migrate your documents and settings.
    Please use the uninstallers to remove your current installation.  They are located in the Applications/Utilities/Adobe Installers folder.  Once the uninstall is complete you will also want to run the CC Cleaner Tool.  You can find more details at Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6 - http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html.
    If you need to download a fresh copy of the installation files for Creative Suite 6 you can do so at Download CS6 products.

  • Can individuals (students) purchase Adobe CC (one application or all) for just a portion of the year (i.e. a semester - 1 to 4 month span)?  My students would like to purchase the program for a month at a time without making a yearly commitment.

    Can individuals (students) purchase Adobe CC (one application or all) for just a portion of the year (i.e. a semester - 1 to 4 month span)?  My students would like to purchase the program for a month at a time without making a yearly commitment.

    Sure they can, just not for a student discount.
    Mylenium

Maybe you are looking for

  • NX vs Xtra vs USB vs To

    i'm probably getting a 40gb touch but want to see how it compares to the other players...i like the fm radio, voice & fm recording (can you record from a line in too)...is the battery removable?...does it have clock/sleep/wake, smart volume, or time

  • Suggestions for new Intel Core i7 Extreme PC?

    Hi all, I'll be buying a new editing PC with the Intel® Core i7 Extreme 3.2GHz processors. Rather than build it myself, I'm looking for a fast and reliable PC from a manufacturer. For several years I used Dell workstations ... and they were stable, b

  • Webservice Synchronous Scenario.

    Hi All, I will trying to implement file->webservice->file scenario using the blog. /people/shabarish.vijayakumar/blog/2006/03/23/rfc--xi--webservice--a-complete-walkthrough-part-1 Upto message mapping everything is fine and configured as given in the

  • PS Elements 12 Special Edition for Costco

    When I try to upload a photo within Elements to Costco it appears to upload, then a window pops up saying uploading (with rotating dots) and finally quits after many minutes.  Does anyone else have this problem?  What is the fix?

  • Communication error with Epson R2880 printer using Snow Leopard 10.6.4

    I am having trouble printing with my Epson R2880 printer on my Mac Pro running OS X 10.6.4 with the most recent software updates. The printer prints about a quarter of the print and then quits giving a "Communication error" message. I have tried unin