! help please, my assignment is overdue

I am not a procrastinator, I am just having trouble compiling this. I have been working on this since 3pm today. it is now 1:41am my time...I can not get my file to compile. I get a cannot find symbol error. I am trying to get information from my product class file to share with my manin method file. Please assist...please.....
This is my toString method
public String toString()
     return String.format( "%s: %d: %d: %.2f: %.2f" );
    }// end method toStringThis is where I get the errors in my main method file:
                System.out.printf( "\t productName: %d", "Product name is",
               DVD.getproductName() );
          System.out.printf( "%s%d\t", "Product number is",
               DVD.getproductNumber() );
                System.out.printf( "%s%d\t", "Product units in stock is",
               DVD.getunitNumber() );
          System.out.printf( "%s%.2f\t", "Product price is",
                DVD.getunitPrice() );
          System.out.printf( "%s%.2f\t", "Product value is",
               DVD.getproductValue() );
          System.out.printf( "\n%s:\n\n%s\n" );

bigcheetah wrote:
never mind the guy before me. people like those can get pretty annoying. Wait until you see the very same question answered four times already in other fora, with all your efforts here being futile.
Just do that, it's alot easierOr the OP could just use printf() correctly. Furthermore, next time the OP might want to actually post the error messages - because the printf(), although not being used correctly, should not be the problem. printf(String, String, Whatever) is a valid signature.
Isn't it annoying when people give bad advise?

Similar Messages

  • Need help in my assignment, Java programing?

    Need help in my assignment, Java programing?
    It is said that there is only one natural number n such that n-1 is a square and
    n + 1 is a cube, that is, n - 1 = x2 and n + 1 = y3 for some natural numbers x and y. Please implement a program in Java.
    plz help!!
    and this is my code
    but I don't no how to finsh it with the right condition!
    plz heelp!!
    and I don't know if it right or wrong!
    PLZ help me!!
    import javax.swing.JOptionPane;
    public class eiman {
    public static void main( String [] args){
    String a,b;
    double n,x,y,z;
    boolean q= true;
    boolean w= false;
    a=JOptionPane.showInputDialog("Please enter a number for n");
    n=Double.parseDouble(a);
    System.out.println(n);
    x=Math.sqrt(n-1);
    y=Math.cbrt(n+1);
    }

    OK I'll bite.
    I assume that this is some kind of assignment.
    What is the program supposed to do?
    1. Figure out the value of N
    2. Given an N determine if it is the correct value
    I would expect #1, but then again this seem to be a strange programming assignment to me.
    // additions followI see by the simulpostings that it is indeed #1.
    So I will give the tried and true advice at the risk of copyright infringement.
    get out a paper and pencil and think about how you would figure this out by hand.
    The structure of a program will emerge from the mists.
    Now that I think about it that advice must be in public domain by now.
    Edited by: johndjr on Oct 14, 2008 3:31 PM
    added additional info

  • Small configure help please? I have 3 300-28 switches, I want to connect them and avoid stp (stp setup)

    HI!
    I have a small network. I have 3 300-28 cisco switches. I already connected my 3 servers  and clients with the switch 1 and now I want to add more clients and I need to add my other two switches in the network. Please guide me with the simple configuration So I can connect them all and avoid loop (stp). Thanks

    Hi Nagaraja Thanthry!
    Thanks for your reply. I am implementing it tomorrow. By just conecting the switches together at trunk ports  will there be no loop? I don't want my network chowk. I hope it will work well. I might need further help, please reply.
    1. I will do setting on all switches. Assign IP addresses to switches (to Vlan 1 default).
    2. Set one port (e.g 28) as trunk and all others as Access on all three switches.
    3. Then I will connect the switches with each other at trunk ports. Hope there will be no loop in this setting.
    4. Do I need to set any setting for stp in switches ?
    Please reply one by one thanks.
    I am using 192.168.0.1 255.255.255.0 IP range.
    Best Regards,

  • HELP PLEASE HELP! urgent question with an easy answer!!!!

    Hello;
    I designed a JFrame game, that uses gif files as ImageIcons. The game works perfectly when I run it from console with the java.exe command.
    However; now I want to create a wraparound and run the JFrame in the Internet Explorer from an applet. So I created a new file that extends JApplet; this new file creates a new object of the JFrame-game's class and show()'s it.
    And I created an HTM file that runs the JApplet class. However, the internet explorer cannot open the applet because it has trouble loading the pictures (gif files). How can I load the pictures from my applet for my frame???
    I dont want to change the Java security file. I just want to make the images accessible by my applet. I cannot use commands like setImage in my applet because my JFrame sets the Images.
    (I repeat)My JApplet only invokes an object of my JFrame class and shows it.
    PLEASE HELP PLEASE PLEASE..
    Thanks..

    OK; let me tell you the whole thing. My pictures are in the same folder for sure.
    My JFrame reads pictures and assigns JButtons pictures. when I run the frame there are 16 buttons with the same picture, and when I click the buttons there is a listener in the JFrame that changes the pictures. Simply put, the JFrame has no trouble finding and loading the pictures.
    Then I created a JApplet as follows:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class MemoryApplet extends JApplet
    public void init ()
         GameFrame ce = new GameFrame ();
         ce.show ();
    GameFrame is the name of the JFrame class. Then when I try to open the applet using IE, it gives the following error:
    Exception: java.security.AccessControlException: (javax.io.FilePermission back.gif read)
    back.gif is one of the gif files that are used in GameFrame

  • Iframe redirect javascript help please

    Hi:
    My client uses a loan application on another service's site, and I embedded the form in an iFrame to keep the user on my client's site.
    At the Submit of the form, it redirects to the client's home page, but it does it within the confines of the frame -- I want the redirect to go to the "top" Home page.  Unfortunately, the offsite service cannot apply a target="_top" to the redirect link script.
    The link is http://sequoiapacificmortgage.com/loan-application/
    The service said this:
    "The thank you page after the application and before the redirect URL has a unique URL.
    Is it possible to code your iframe to recognize this URL and redirect the full site to your home page rather than depending on the vLender redirect within the iframe?
    I am including the unique thank you page URL from Lori's website below, the ref_ID attribute is the unique application ID number assigned to my test application (the application ID's are generated using the first 3 letters of the applicant's first name [LYN for Lynsee] and the first 3 letters of the applicant's last name [TES for Testing] followed by the numeric sequence) but you should be able to remove that and have your custom site's code recognize the .php url which would trigger a redirect within your site's code that would take place before our system enacts its redirect to the home page within the iframe.
    (https://www.vlender.com/apps/templates/new_thank_you.php?ref_id=LYNTES998262971)"
    I have seen several references to Javascript to accomplish the desired redirect, but I am not sure how to construct it, nor if it can capture the presence of the mentioned URL to trigger it.
    Can anyone help please?  Thanks much!
    Rgds, Ned

    You are talking about JavaScript - Java and JavaScript are two completely different things. Therefore, this is not the correct area to post that question.

  • Urgent help please with MIDI pedal

    I just got an old awesome midi pedal called the X-15 Ultrafoot.
    The pedal has two expression pedals, and 10 pushbuttons/pads. (and two buttons to cycle through additional banks, and a "mode" and "bypass" button)
    Somebody please help I am on the verge to having amazing control.
    What I want to do is have each pushbutton be assigned to a parameter, which is easy to program. Then I want to make the expression pedal(s) also be assigned to that last selected parameter. How do I do this?
    How can I make the expression pedals control over the parameter remain exclusive to just the last selected parameter?!
    Somebody save me please thanks

    mr kglad i really hope my ( too many replies and questions ) don't bother you.. but please excuse me if they sound foolish or something im a beginner as mentioned...
    There must be something wrong with whatever im doing ... ( im so desperate and since you are the only one who replied on me i really need your help please.. )
    1- i published the first fla as a swf (10.3 ) with a button with the code you've given me )
    2- i published the second fla as a swf (10.3) with another button with the same code you've given me )
    3- i made a main page where there are two buttons.. one for english and one for foreign language
      English button with this code :
    Engbutton.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_4);
    import fl.display.ProLoader;
    var fl_ProLoader_4:ProLoader;
    //This variable keeps track of whether you want to load or unload the SWF
    var fl_ToLoad_4:Boolean = true;
    function fl_ClickToLoadUnloadSWF_4(event:MouseEvent):void
        if(fl_ToLoad_4)
            fl_ProLoader_4 = new ProLoader();
            fl_ProLoader_4.load(new URLRequest("englishformFIN.swf"));
            addChild(fl_ProLoader_4);
        else
            fl_ProLoader_4.unload();
            removeChild(fl_ProLoader_4);
            fl_ProLoader_4 = null;
        // Toggle whether you want to load or unload the SWF
        fl_ToLoad_4 = !fl_ToLoad_4;
    and the other button with the same code ( the second fla )
    IT DOESNT WORK WHEN I TEST THE MOVIE.. the return buttons nor the main ones..why why why why why... ???
    i really need your help
    THANK YOU in advance

  • When I disconnect my iPhone 4s from the charger, it gives me the dial pad with a emergency call option... help please?

    When I disconnect my iPhone 4s from the charger, it gives me the dial pad with a emergency call option... help please?

    Hello there, curtq.
    Great job troubleshooting your issue so far. The following Knowledge Base article offer some great practical steps for troubleshooting Wi-Fi issues with your iOS device:
    iOS: Troubleshooting Wi-Fi networks and connections - Apple Support
    If following the initial troubleshooting steps recommended at the beginning of the article, you may want to then proceed to:
    Unable to access the Internet while connected to Wi-Fi
    If you're using a public or commercial network, you may need to log in or subscribe.
    Check to see if you have a self-assigned IP address:
    Tap Settings > Wi-Fi and locate the Wi-Fi network to which you're connected and tap .
    If your IP address is 169.254.xxx.xxx, you may not be able to access the Internet.
    If you do not have a self-assigned IP address, see if other Wi-Fi devices on your network have Internet access.
    If they do not, consult with your network administrator or ISP for further assistance.
    If they do, reset network settings on your device by tapping Settings > General > Reset > Reset Network Settings. Note: This will reset all network settings including:
    previously connected Wi-Fi networks and passwords
    recently used Bluetooth accessories
    VPN and APN settings
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • IMove 9... Project cannot locate clips after I chose "Split Event Before Clip." Help please!

    iMovie 9; chose "Spit Event Before Clip." Project now cannot locate Event clips for that Project. All Events and Clips are on an extenal HD. All I see are !-points for all clips in the Project. Help!
    I noticed another Event folder for the same clips so I "Merged" them. Still nothing. I've had nothing but problems with the waaay overdue project. I really need some help, please!
    gb

    I'd even gladly pay someone to walk me through this on the phone! I'm really desperate at this point!
    gb

  • Color help please!

    Color help please!
    When I view a file in CS5, the colors are vastly different than when I view the same file from any other program on my computer.  I calibrate regularly and want to be viewing as per the calibration on CS5- are there setting I need to change in CS5 or are those accurate and I need to change the settings in my control panel??  Thank you!!

    So that you can be better helped,what OS/version are you running,what software/hardware do you calibrate your monitor with,and what are the Color Preference settings in Photoshop?  That can be accessed with Ctrl + Shift + k in Photoshop. If you can manage a screenshot of just that Preference dialog,it will help a lot.
    I'll add that Windows applications are not color managed as Photoshop is. Windows and many files you see on the web are sRGB. If Photoshop's Color Workspace  is set to either Adobe RGB or Pro-Photo, a regular color graphics file  will show up with the colors saturated. That's because most color files do not have a tag telling Photoshop what color space it came from and Photoshop if set to other than sRGB will not display it properly.
    You could set Photoshop's Working space to sRGB (North American General Defaults 2) if your pictures are intended for the web, or if you must use Adobe RGB (commercial press work),then you must tag or Assign an sRGB profile if your file has no profile assigned. If it already has a tag other than sRGB, then you make a copy and Convert it to sRGB to display properly in Windows apps.
    That's a rough guess as to why your files do not display properly in CS5. Assign Profile and Convert to Profile are both under PS's Edit Menu.
    Gene

  • I keep being asked to update my Safari but when I do a Software update it scans but never gives me a list and just says no new updates. Help please!

    I keep being asked to update my Safari but when I do a Software update it scans but never gives me a list and just says no new updates. Help please!

    There are no updates to either OS 10.5.8 or Safari 5.0.6.
    If you need a later version of Safari you must first upgrade your operating system to a later version of OS X.

  • At the end of my IMovie I want to write some text: as in" Happy Birthday Mandy we had a great time with you. etc..  How do I go about this? Which icon in IMovie lets me have a place to write text?? help please

    Please see my ? above: Im making an IMovie and need the last frame to just be text (can be on a color). I don't know how to go about doing this.  Ive already done all my photos and captions. Need to have it ready for TOMORROW: Friday May 23rd. Help please!
    Thanks

    You can choose a background for the text from Maps and Backgrounds.  Just drag a background to the end of the timeline, adjust to desired duration then drag title above it.
    Geoff.

  • I have just updated my PC with version11.14. I can no longer connect to my Bose 30 soundtouch via media player Can anyone help please

    I have a Bose soundtouch system .Until today I could play my iTunes music through it via air  player . .I have just uploaded the latest upgrade from iTunes and now I am unable to connect to the Bose system . Can anyone help please? I can connect via my iPad and by using the Bose app so it is not the Bose at fault

    @puebloryan, I realize this thread is a bit old, but I have encountered a similr problem and wondered if you had found a solution. I've been using home sharing from itines on my PCs for years, but two days ago, it suddenly stopped. I can share from my Macs, but not from the ONE PC library where I keep all my tunes. I tried all the usual trouble-shooting measures.
    After turning home sharing off on the PC's iTunes, turning it back on and turning some other settings off and on, my Macs and Apple TV could briefly "see" the PC library, but as soon as I try to connect -- the wheel spins for a bit and then the connection vanishes. It's as if they try and then give up.
    Since this sounds so similar to your problem, I was hoping you finally found a solution. I am also starting a new thread. Thanks!

  • My iMac 24 can no longer be paired with the keyboard; it doesn't recognise any keyboard at boot up, even the one it is paired with. Can anyone help, please?

    My iMac 24 can no longer be paired with the keyboard; it doesn't recognise any keyboard at boot up, even the one it is paired with. Can anyone help, please?
    Thank. Simon

    Brian - The batteries are fine and there has only every been one keyboard paired with it. We have tried my MacPro keyboard as well, and it will not even recognise that there is a discoverable keyboard nearby.
    Thanks, Simon

  • Photoshop Elements 6 on Mac help please !!!!!

    Hi there,
              I need help please !!!!!
    I have PSE 6 for my imac and bought myself a NIKON D60 so far so good. I have installed PSE 6 which comes with ADOBE Bridge CS3
    I have bought a book as well as I am new to photoshop and in fact DSLR cameras.
    I have got my photos into Bridge OK by the way they are JPEG format. According to the book I can open the JPEG in camera RAW by either selecting the JPEG and then pressing cmd+R or by selecting the JPEG and select open with and camera RAW should be available to selct.
    I cannot get of the options to work any ideas please
    Secondly I have taken some photos in RAW format and put then into Bridge again I cannot get the camera RAW interface to open with these neff images.
    If I try to open the image PSE 6 opens and gives me an error that the file format is not supported by PSE 6
    Am I missing something here as I have been trying for a week now !!!!!
    Sorry if this comes across a stupid question but it is new to me
    Chris      UK

    There's no "theory" about it. You should be able to open a raw file from bridge by double-clicking it, but it will open in ACR in PSE. You can't just use ACR within bridge in PSE, if that's what you're trying to do. To open a JPEG in ACR, go to file>Open in PSE and choose Camera raw as the format after you select the file but before you click Open.
    If you've correctly updated ACR, bridge should show you thumbnails of your raw files. If it doesn't try emptying the Bridge cache.

  • Photoshop CS2. Help please.

    Approx 8 years ago I purchased Photoshop CS2 online from Adobe. This past weekend I had to buy a new computer (Windows 8.1), and when I logged into my Adobe account just now to obtain my serial number and enter it after I attempted to download CS2, it said invalid serial number. Help please.
    Both tech support and the online chat person were not able to help me.

    The Activation Servers for CS2 and prior have been taken down. See the link below for an explanation and solution. Be sure to follow all directions, including using the new download serial number supplied on the page.
    CS2 and prior
    http://helpx.adobe.com/x-productkb/policy-pricing/creative-suite-2-activation-end-life.htm l
    --OB

Maybe you are looking for

  • Image processing Manupulation problem!!!

    Dear all, God Morning! hope u all are fine .. i have an issue regarding Image processing Manipulation. i want to give u all the details.. what i have done so far in java. i have used third party tool of java called ImageJ editor for image manipulatio

  • ILL-CS2 runtime error R6025

    I wrote a script that from time to time produces a "runtime error R6025 - pure virtual function call" for no apparant reason. I've noticed that when I run the script through the debugger this error doesn't occur, but it does when I let it run on it's

  • Can I get a response back when I use HTTP adapter

    Hi , I am doing a integration between SAP and ThirdParty Product using PI 7.1. The scenario is ThirdParty -> PI -> SAP ,using HTTP adapter between ThirdParty and PI , and IDoc adapter between SAP and PI. So,its a HTTP sender and IDoc receiver. So I w

  • Please help with Layer Mask

    I have been painting in Photoshop using layer masks. Using the pen tool I would outline my image, control>R-click>select create layer mask, then I would paint as desired. When doing so it would create a grey layer mask background in the layers window

  • How do I get rid of the safari nag in yosemite?

    I upgraded to Yosemite recently. Now, every so often when I launch Chrome, I get a nag to try out safari. I dismissed it once, and it's come back. This is pretty much aggressively annoying. I'd love to find a way to prevent this from popping up anymo