Can someone assist me with  my array?

I am creating an array that will store 3 objects, and display information one line at a time. I am not sure I am typing the right code to produce the information I need. My code does not compile. However it compiled before I added my array lines. the weird thing is im getting the compile error on my Product DVD line.
Here is what I have so far:
public class Inventory
     public static void main(String args[])
     Product media[] = new Product [3];
     for(int i = 0; i < Product; i++)
     Product DVD = new Product("Princess Bride", 1, 5, 19.95); //creates a new object
          System.out.print(DVD.getproductName() + "\t" + DVD.getproductNumber() + "\t" + DVD.getunitNumber() + "\t\t");
          System.out.printf("$ %.2f\t\t", DVD.getunitPrice());
          System.out.printf("$ %.2f\n", DVD.getcalculateValue());
     Product CD = new Product("Maroon5 Live", 2, 7, 25.00); //creates a new object
          System.out.print(CD.getproductName() + "\t" + CD.getproductNumber() + "\t" + CD.getunitNumber() + "\t\t");
          System.out.printf("$ %.2f\t\t", CD.getunitPrice());
          System.out.printf("$ %.2f\n", CD.getcalculateValue());
     Product VHS = new Product("Dance With Me", 3, 12, 14.95); //creates a new object
          System.out.print(VHS.getproductName() + "\t" + VHS.getproductNumber() + "\t" + VHS.getunitNumber() + "\t\t");
          System.out.printf("$ %.2f\t\t", VHS.getunitPrice());
          System.out.printf("$ %.2f\n", VHS.getcalculateValue());
     System.out.printf( "Total Inventory Value is: $ %,.2f\n", DVD.getcalculateInventory() + CD.getcalculateInventory() + VHS.getcalculateInventory());//display total inventory value
   } // end main method
}//end class Inventory

for(int i = 0; i < Product; i++){   // should be i<media.length
but why are you using a loop?
public class Inventory{     
     public static void main(String args[]){
     Product media[] = new Product [3];
     Product DVD = new Product("Princess Bride", 1, 5, 19.95); //creates a new object
          System.out.print(DVD.getproductName() + "\t" + DVD.getproductNumber() + "\t" + DVD.getunitNumber() + "\t\t");
          System.out.printf("$ %.2f\t\t", DVD.getunitPrice());
          System.out.printf("$ %.2f\n", DVD.getcalculateValue());
     Product CD = new Product("Maroon5 Live", 2, 7, 25.00); //creates a new object
          System.out.print(CD.getproductName() + "\t" + CD.getproductNumber() + "\t" + CD.getunitNumber() + "\t\t");
          System.out.printf("$ %.2f\t\t", CD.getunitPrice());
          System.out.printf("$ %.2f\n", CD.getcalculateValue());
     Product VHS = new Product("Dance With Me", 3, 12, 14.95); //creates a new object
          System.out.print(VHS.getproductName() + "\t" + VHS.getproductNumber() + "\t" + VHS.getunitNumber() + "\t\t");
          System.out.printf("$ %.2f\t\t", VHS.getunitPrice());
          System.out.printf("$ %.2f\n", VHS.getcalculateValue());
     System.out.printf( "Total Inventory Value is: $ %,.2f\n", DVD.getcalculateInventory() + CD.getcalculateInventory() + VHS.getcalculateInventory());//display total inventory value
        media[0] = DVD;
        media[1] = CD;
        media[2] = VHS;
   } // end main method
}//end class Inventory

Similar Messages

  • I am unable to complete Synching with my IPhone 4S as it tells me reason is that Apps are unable to be determined on my phone however all of them Purchased from I Tunes. Can someone assist me with a Solution

    I am unable to complete Synching with my IPhone 4S as it tells me reason is that Apps are unable to be determined on my phone however all of them Purchased from I Tunes. Can someone assist me with a Solution

    You can't merge accounts. But you can check your purchase history:
    iTunes Store & Mac App Store: Seeing your purchase history and order numbers
              http://support.apple.com/kb/HT2727
    Also, what may seem stupid to you... may be a protection of privacy to others.

  • HT4623 can someone assist me with a solution to the problem with my iphone 5. I upgraded to IOS 6.1.4 and since then i have had the problem of No Sim. I restored to the factory settings using i tunes as i have my back up on my pc but still the same proble

    can someone assist me with a solution to the problem with my iphone 5. I upgraded to IOS 6.1.4 and since then i have had the problem of No Sim. I restored to the factory settings using i tunes as i have my back up on my pc but still the same problem. I have swapped sim and my Sim is working on other iphone with ios 6.1.3

    Try a new SIM from your carrier.  If that doesn't work, make a Genius Bar appointment and get your phone evaluated.

  • Can someone help me with scanned items?

    can someon assist me with scanned documents?

    Select the folder whilst holding down the control key - there will be a pop-up menu with an item "Compress "Test Folder"" (the name of your folder). This will create a zip file which you can attach to an outgoing email, leaving the user on the other end, the recipient of your mail, a zipped, compressed file which he/she can unzip and have access to your scans.
    Clinton

  • HT4095 Hello.  I purchased two movies but don't have wifi.  Have connected to computer but do not know how to download. Keeps showing to connect to computer. Can someone assist.

    Good afternoon.
    Purchased two movies but have no wifi on ipad.  Have connected to computer but ipad shows to connect before downloading.  Can someone assist to download movies from pc whilst ipad is connected.

    Hello Delia,
    Thank you for the question.  It sounds like you are trying to sync movies to your iPad using iTunes.  The following articles provide steps on syncing your iPad with iTunes. 
    You can manage what movies sync to your iPad using the Movies tab when your iPad is connected and then clicking Apply when you have decided what movies to transfer:
    I wasn’t sure if you were using a Mac or Windows computer, so I included the articles for each:
    iTunes 11 for Mac: Set up syncing for iPod, iPhone, or iPad
    http://support.apple.com/kb/ph12113
    iTunes 11 for Windows: Set up syncing for iPod, iPhone, or iPad
    http://support.apple.com/kb/ph12313
    Once you sync your movies, they will appear in the Videos app on your iPad as described in the featured discussion below:
    I forgot how to get a movie. I want to download it on the computer, sync it to the iPad. Then, I forget where it is, how I find it on the iPad to watch it.
    https://discussions.apple.com/thread/5980061
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • You can't open the application "MFI_Simulator.exe" because Microsoft Windows applications are not supported on OS X. Can someone assist. I have Office for Mac 2011 on MacBook Pro 13''.

    You can’t open the application “MFI_Simulator.exe” because Microsoft Windows applications are not supported on OS X. Can someone assist. I have Office 2011 on my MacBook Pro, OS X, 10.9.1.

    Your Office 2011, though a Microsoft product, is designed to work with OSX the Mac operating system.  Any program/application ending .exe is an executable program for Windows.  It will only work in Windows and is not part of or openable with Microsoft Office.
    the application you want to open needs Windows - you have a couple of alternatives:
    Open it on a Windows PC
    Install a valid version of Windows via Bootcamp (or Parallels or VM Fusion) which will allow you to boot your Mac into Windows where it will function like a Windows PC and you can use it to run the application.
    See if the manufacturers of MFI_Simulator have a Mac version available.
    Please note that if you follow the second option, then you will need to purchase a copy of Windows (if you do not have one already). BootCamp is free (part of OSX) but Parallels and VM Fusion cost too.  I see quite a few posts from people who buy Parallels and try to run the program under Parallels - this doesn't work - you need to install Windows as well.
    Hope this helps.

  • Can you assist me with canceling my cc subscription

    can you assist me with canceling my cc subscription?

    I'm confused. You suggest that all that is needed is to go to Cancel Your Membership or Subscription  Creative Cloud. It doesn't work that simply.
    I have attempted to cancel many times and I am sent to Customer Service where it is impossible to contact anyone for assistance.
    I have wanted to change the date that my payment was made. I called in mid February and it was explained that all I needed to do was cancel my account then subscribe once again on the date I want my payment withdrawn. The gentleman I spoke with told me on account of my cancel-resubscribe" I would not be charged the penalty for canceling before the end of my one year contract.
    When I have attempted to speak with someone once again today I have found it impossible to find a number I can call.
    I understand that I need to be on the Adobe CC to take care of this, but I have been there all morning with no success.
    I DID note that it appears I have an account with the payment date I am trying to change. If I were to open an account today, todays date would be my payment date. I don't know what else to do and can not figure out how I was able to contact someone last month.

  • I have an early 2011 MacBook Pro which has been running slow for a while. After looking at responses to similar problems I have downloaded and run EtreCheck and will post the output. Please can someone help me with what it all means.Thanks in advance

    I have an early 2011 MacBook Pro which has been running slow for a while. After looking at responses to similar problems I have downloaded and run EtreCheck. Please can someone help me with what it all means.
    Thanks in advance.
    EtreCheck version: 1.9.15 (52)
    Report generated 19 September 2014 08:07:14 GMT+8
    Hardware Information: ?
      MacBook Pro (13-inch, Early 2011) (Verified)
      MacBook Pro - model: MacBookPro8,1
      1 2.3 GHz Intel Core i5 CPU: 2 cores
      4 GB RAM
    Video Information: ?
      Intel HD Graphics 3000 - VRAM: 384 MB
      Color LCD 1280 x 800
    System Software: ?
      OS X 10.9.4 (13E28) - Uptime: 0 days 0:4:29
    Disk Information: ?
      Hitachi HTS545032B9A302 disk0 : (320.07 GB)
      S.M.A.R.T. Status: Verified
      EFI (disk0s1) <not mounted>: 209.7 MB
      Macintosh HD (disk0s2) / [Startup]: 319.21 GB (147 GB free)
      Recovery HD (disk0s3) <not mounted>: 650 MB
      MATSHITADVD-R   UJ-898 
    USB Information: ?
      Apple Inc. FaceTime HD Camera (Built-in)
      Apple Inc. BRCM2070 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Computer, Inc. IR Receiver
    Thunderbolt Information: ?
      Apple Inc. thunderbolt_bus
    Gatekeeper: ?
      Mac App Store and identified developers
    Kernel Extensions: ?
      [not loaded] com.seagate.driver.PowSecDriverCore (5.2.4 - SDK 10.4) Support
      [not loaded] com.seagate.driver.PowSecLeafDriver_10_4 (5.2.4 - SDK 10.4) Support
      [not loaded] com.seagate.driver.PowSecLeafDriver_10_5 (5.2.4 - SDK 10.5) Support
      [not loaded] com.seagate.driver.SeagateDriveIcons (5.2.4 - SDK 10.4) Support
      [loaded] com.sophos.kext.sav (9.1.55 - SDK 10.7) Support
      [loaded] com.sophos.nke.swi (9.1.50 - SDK 10.8) Support
    Launch Daemons: ?
      [loaded] com.adobe.fpsaud.plist Support
      [loaded] com.microsoft.office.licensing.helper.plist Support
      [running] com.sophos.autoupdate.plist Support
      [running] com.sophos.configuration.plist Support
      [running] com.sophos.intercheck.plist Support
      [running] com.sophos.notification.plist Support
      [running] com.sophos.scan.plist Support
      [running] com.sophos.sxld.plist Support
      [running] com.sophos.webd.plist Support
      [running] com.trusteer.rooks.rooksd.plist Support
    Launch Agents: ?
      [loaded] com.divx.dms.agent.plist Support
      [loaded] com.divx.update.agent.plist Support
      [running] com.sophos.uiserver.plist Support
      [running] com.trusteer.rapport.rapportd.plist Support
    User Launch Agents: ?
      [loaded] com.adobe.ARM.[...].plist Support
      [running] com.amazon.music.plist Support
      [loaded] com.google.keystone.agent.plist Support
      [not loaded] jp.co.canon.Inkjet_Extended_Survey_Agent.plist Support
    User Login Items: ?
      iTunesHelper
      TomTomHOMERunner
      AdobeResourceSynchronizer
      Dropbox
    Internet Plug-ins: ?
      FlashPlayer-10.6: Version: 15.0.0.152 - SDK 10.6 Support
      DivX Web Player: Version: 3.2.1.977 - SDK 10.6 Support
      AdobePDFViewerNPAPI: Version: 11.0.09 - SDK 10.6 Support
      AdobePDFViewer: Version: 11.0.09 - SDK 10.6 Support
      Flash Player: Version: 15.0.0.152 - SDK 10.6 Support
      EPPEX Plugin: Version: 10.0 Support
      Default Browser: Version: 537 - SDK 10.9
      OVSHelper: Version: 1.1 Support
      QuickTime Plugin: Version: 7.7.3
      SharePointBrowserPlugin: Version: 14.4.4 - SDK 10.6 Support
      iPhotoPhotocast: Version: 7.0 - SDK 10.7
    Safari Extensions: ?
      Ultimate
    Audio Plug-ins: ?
      BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
      AirPlay: Version: 2.0 - SDK 10.9
      AppleAVBAudio: Version: 203.2 - SDK 10.9
      iSightAudio: Version: 7.7.3 - SDK 10.9
    iTunes Plug-ins: ?
      Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
    3rd Party Preference Panes: ?
      Flash Player  Support
      Perian  Support
      Trusteer Endpoint Protection  Support
    Time Machine: ?
      Skip System Files: NO
      Auto backup: YES
      Volumes being backed up:
      Macintosh HD: Disk size: 297.29 GB Disk used: 160.38 GB
      Destinations:
      Data [Network] (Last used)
      Total size: 2 TB
      Total number of backups: 99
      Oldest backup: 2012-04-20 17:05:32 +0000
      Last backup: 2014-09-18 23:49:25 +0000
      Size of backup disk: Excellent
      Backup size 2 TB > (Disk size 297.29 GB X 3)
      Time Machine details may not be accurate.
      All volumes being backed up may not be listed.
    Top Processes by CPU: ?
          6% InterCheck
          5% iCalExternalSync
          3% WindowServer
          2% CalendarAgent
          2% SystemUIServer
    Top Processes by Memory: ?
      152 MB SophosScanD
      147 MB InterCheck
      106 MB SophosAntiVirus
      66 MB Dropbox
      57 MB com.apple.iTunesLibraryService
    Virtual Memory Information: ?
      161 MB Free RAM
      1.55 GB Active RAM
      1.41 GB Inactive RAM
      902 MB Wired RAM
      611 MB Page-ins
      0 B Page-outs

    Uninstall Trusteer software
    http://www.trusteer.com/support/uninstalling-rapport-mac-os-x
    Remove Sophos
    https://discussions.apple.com/message/21069437#21069437

  • Can someone help me with an iCloud problem when I take a picture with my iPhone 4s it some of the times go to my ipad2 but mostly it doesn't can anyone help me out

    Can someone help me with an iCloud problem when I take a picture with my iPhone 4s it some of the times go to my ipad2 but mostly it doesn't can anyone help me out

    I'm assuming you have Photo Stream set up of both devices.  However, it seems many users are experiencing the same as you - my take is that streaming photos is not foolproof yet.

  • I have iOS 7. When I go to the itunes store on my ipod touch it gives me a blank screen with nothing on it. I restarted my ipod touch and it didn't work. Can someone help me with this?

    I have iOS 7. When I go to the itunes store on my ipod touch it gives me a blank screen with nothing on it. I restarted my ipod touch and it didn't work. Can someone help me with this?

    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Go to Settings>iTunes and App stores and sign out and sign back in
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.      

  • The calender on my iPhone 4 with iOS 6 no longer syncs with iCal 4.0.4 on my mac OS 10.6.8. However it is syncing with my iCloud account. Can someone help me with this?

    The calender on my iPhone 4 with iOS 6 no longer syncs with iCal 4.0.4 on my mac OS 10.6.8. However it is syncing with my iCloud account. Can someone help me with this?

    FYI: It seems it was a network problem with my WinXP PC. After complete deletion and new installation of XP and iTunes my iPhone will be recognized correctly, Wifi synchronization works (mostly) fine.

  • Iphone 3gs shows activation required, hocked up to iTunes and it is not recognized. Did the restore but just gets to the end and gives an error message it could not be restored, an unknown error occurred (-1). Can someone assist me in next steps please?

    iphone 3gs shows activation required, hooked up to iTunes and it is not recognized. Did the restore but just gets to the end and gives an error message it could not be restored, an unknown error occurred (-1). Can someone assist me in next steps please?

    Instructions to get the phone back working temporary.. till there is a real fix.
    1. turn off the phone
    2. fire up iTunes
    3. press and hold the home button, plug in the cable, hold till you get to see the recovery mode
    4. iTunes will the allow to choose restore the phone back to 5.0.1 ( no other choice)
    5. iTunes will then ask you to choose which previous backup to would like to recover.
    (note: please do not reboot your phone unless necessary, i realize at times after reboot, it goes back to sq1)

  • Hi, can someone help me with my External HDD??? Please

    Hi, Can someone help me with my Extenal HDD???
    Please

    After you have all of the files from the External HDD you want to save, to format the HDD:
    Open Launchpad
    Open Utilities
    Open Disk Utility
    Select Hard Drive to format (the external HDD)
    If you want to change partition size or number select Partition Table
    Select number of partitions and adjust sizes if more than one
    Name the partitions
    Select the format from the pop-up menu (use Mac OS Extended (Journaled))
    If it is not already selected, select GUID Partition Table
    Click OK
    Click Apply
    And it should do the formatting for you.
    Note: giving a name may come after the format selection, I sometimes get that out of order but it will lead you through the process.

  • I have a licensed copy of Adobe Acrobat X Pro for Windows.  I recently switched over to MAC OS and would like to move my Adobe X Pro over but the CD will not work for Mac OS?  Can anyone assist me with this conversion?  Best,  James.

    I have a licensed copy of Adobe Acrobat X Pro for Windows.  I recently switched over to MAC OS and would like to move my Adobe X Pro over but the CD will not work for Mac OS?  Can anyone assist me with this conversion?
    Best,
    James.

    you cannot use your pc license to install on a mac.  you would need a separate license (and serial number) for that.
    adobe allows platform swaps, but only with the latest (xi) version, Order product | Platform, language swap
    your option to use acrobat on a mac are to upgrade to acrobat pro xi and change platforms, use a windows emulator (parallels/boot camp etc) on your mac or swap with a third party.

  • I have a problem with my blackberry 9360, I bought it last 2months, and now when I use video camera or camera I saw a red and blue line. Can someone help me with this issue?

    I have a problem with my blackberry 9360, I bought it last 2months, and now when I use video camera or camera I saw a red and blue line. Can someone help me with this issue?

    Hello zukafu, 
    Welcome to the forums. 
    In this case we can try to reload the software on the BlackBerry® smartphone to make sure it is running the latest version and there are no issues with the OS.
    Here is how to backup your BlackBerry smartphone http://bbry.lv/oPVWXc
    Once you have backed up your BlackBerry smartphone please follow the link below to complete a clean reload of the BlackBerry smartphone software.
    Link: http://www.blackberry.com/btsc/KB03621
    Once completed test it and proceed with a selective restore, here is how to restore http://bbry.lv/qgQxLo
    Thank you
    -SR
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

Maybe you are looking for

  • Black Screen with curser When Installing Windows 7 on Mavericks

    I have been trying to install windows on my macbook pro via bootcamp all day today, i have put about 7 hours into it and i am very frustrated. I have followed the guides. I have updated my mac, installed the windows support drivers, i have the most r

  • Loading images using TOAD

    Hi, can someone help me? I'd like to create a simple database that contains images. I've already used the Oracle DB tutorial, but at the moment it's difficult for me to load an image correctly using TOAD. Can someone give me a simple code (mine does'

  • Porting of SPARC application to x86

    Hi All - I have SPARC working application code, which needs to be ported to solaris 10 x86. I added -D__386 to the compile flags. Compiled fine, but have problems in running. If I compile with -D_BIG_ENDIAN, seems like the application processes go fu

  • Wo kann man die Linienstärke der Felder verändern?

    Ich möchte die Linienstärke und die Größe der Formularbox ändern, kann aber nur die Textgröße ändern

  • Rep-34551 oracle graphics graph is deprecated

    We are upgrading our application form 6i to 11g. While migrating graphic reports 6i to 11g (11.1.2) it gives error. when we open graphic graph report in report builder it gives following error. rep-34551 oracle graphics graph is deprecated. while sav