Inserting Records in an Array and using a constructor with it

I badly need help on this! Please please please! I have been studying java for a short time only.
Anyway, here goes: My project requires the following:
Employee inputs the no. of video in the shelf. They have four classifications: Drama, Comedy, Action, and Thriller. Each video classification has different rates. The employee creates a video record containing the following information: 1. video ID number, 2. video classification, and 3. Price.
The employee should display the classifications of videos available and the price. Only the available video tapes would be displayed according to the customer's chosen classification. When the customer chooses the video he wants to rent, the program will register and attach the name of the customer to the video number.
I only need to use arrays, and NOT database to record the information.

is it ok i i declare the drama_rate outside the video class?
i have a list of variables on my videoupdate classYes. It's probably best to declare it static & then you can access it directly:
public static float drama_rate = 100.0;
rate = <the class name>.drama_rate;
so, i should also include a customer no. both in the video and customer class.I would. You may want to list a bunch of videos and who currently has them. This way you don't have to search the customers AND the videos to do this.
thanks =) i don't know either why we had to validate/invalidate,\
but our applet doesnt refresh when >it is supposed to, so
we just used this method. It wouldnt slow down the application, would it?Could you just revalidate()?
the use of arrays. i havent finished with the program yet.
i have the design already, i just couldnt put it in code.
im not familiar with the use of multidimensional arrays-
can i use this for the video and customer records i will need to store?Not sure what you're using arrays for, but here's an example of something I might do. Maybe it will be useful to you.
Have you looked at HashMaps? You could use "Customer" as the key and then use an ArrayList of checked out Videos as the value:
HashMap customers = new HashMap();
ArrayList videos = new ArrayList();
//Add the checked out videos to the list
videos.add(video);
<etc>
// Add this customer and the list of videos he has checked out.
customers.put(customer,videos);
[\code]

Similar Messages

  • I had an iPad2 and use a PC with windows xp to synchronize iTunes. Now i have a Mackbook Pro. How do I synchronize my Ipad to the new macbook without losing all my data?

    I had an iPad2 and use a PC with windows xp to synchronize iTunes. Now i have a Mackbook Pro. How do I synchronize my Ipad to the new macbook without losing all my data?

    On the MacBook launch iTunes.
    From the menu bar click Store / Authorize This Computer.
    Now sync your iPhone.
    Apple - Support - iPhone - Syncing

  • Can I use ICloud to store all my data and use it seamlessly with my devices and Mac?

    Can I use ICloud to store all my data and use it seamlessly with my devices and Mac.  I.E. I want to use it as I use my time capsule and get rid of all this stuff I have in my office.

    Yes.
    Apple - iCloud - Learn how to set up iCloud on all your devices

  • Can bookmarks be protable for multiple computers? Is it an option to log on and use my bookmarks with multiple computers and locations? Thanks

    Can bookmarks be protable for multiple computers? Is it an option to log on and use my bookmarks with multiple computers and locations? Thanks

    Profile is a folder which store all your personal data in a safe place
    * https://support.mozilla.com/en-US/kb/Profiles
    You can use this button to go to the current Firefox profile folder:
    * Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    here explain how to backup profile
    * https://support.mozilla.com/en-US/kb/Backing%20up%20your%20information
    Here explain how to restore it
    *https://support.mozilla.com/en-US/kb/Recovering%20important%20data%20from%20an%20old%20profile

  • I get an "unable to connect" message yet I can connect and use Internet Explorer with no problem. I tried updating to Firefox4 and still get the same message. What do I do?

    I get an "unable to connect" message yet I can connect and use Internet Explorer with no problem. I tried updating to Firefox4 and still get the same message. What do I do?

    JungleTaxi Cabbie wrote:
    Csound1: iCloud: Configuring Mail with Mac OS X v10.6 or iOS 4
    Enter your Incoming Mail Server, User Name, and Password using the following settings:
    Incoming Mail Server: mail.me.com
    User Name: Your iCloud email address (excluding @me.com)
    Password: Your password
    Last Modified: Jun 27, 2013
    Maybe you should test these things before calling people out, because these settings do function perfectly well.
    iCloud is not supported on Snow Leopard or lower, why bother to mention it?
    The OP has an iCloud account, and that can not be opened without Lion or Mountain Lion (on a Mac), IOS5 or 6 (on an iPhone/iPad)
    The document I linked to is Apples documentation for iCloud on current devices,I don't care whether you believe that you know better than they do, but it will affect the people who follow your advice as it won't work
    JungleTaxi Cabbie wrote:
    Also, if you're not running Lion or Mountain Lion, there is no "Mail, Contacts & Calendars" prefpane.
    I never said that there was, perhaps you imagined it.

  • HT204053 I have an Apple ID and use I Cloud with my Ipad and Iphone. I am trying to publish a website from my macbook but my user name and password is not recognised when I try?

    I have an Apple ID and use I Cloud with my Ipad and Iphone. I am trying to publish a website from my macbook but my user name and password is not recognised when I try?

    Ken.Lloyd wrote:
    Sorry for the delay. System preferences icloud is not an option for me. Syst preferences mobileme is
    The minimum requirement for iCloud is Lion 10.7.2 - earlier systems don't show the iCloud preference pane. If you want to use iCloud you will have to upgrade to Lion or Mountain Lion (assuming your computer meets their requirements) but even so you won't be able to publish web pages to iCloud because it does not provide web hosting. This page examines that situation in more detail:
    http://rfwilmut.net/missing2

  • Can I connect and use Time Capsule with two printers?

    Can I connect and use Time Capsule with two printers?

    Sure, if the printers connect using the Ethernet port, you have 3 ports on the Time Capsule.
    If the printers connect using wireless only, the Time Capsule will support up to 50 connections.
    If your printers connect using USB, then you will need a powered USB hub. Something like this, for example:
    Dynex 4Port USB 2.0 Hub DX-THUB16 - Best Buy

  • Insert record - works in FF and Safari, but not IE

    I think this is an odd one - I have a site which uses a
    fairly standard form to add a record to a database.
    I changed the input code to have an image as the button to :
    <input type="image" name="New Vehicle" id="New Vehicle"
    value="Insert record" alt="Add New Vehicle"
    src="../images/addvehiclebutton.jpg" />
    It worked in Safari, so I had no reason to think it wouldn't
    work in IE.
    All that happens is that the form resets.
    Can anyone shed any light on why it doesn't work in IE?
    Cheers.

    Iain71 wrote:
    > Can anyone shed any light on why it doesn't work in IE?
    Yes, IE doesn't send the name of an image used as a button.
    Instead, it
    sends the mouse coordinates. I can't remember offhand what
    names IE uses
    (it's probably something like mouseX and mouseY), but you can
    easily
    find out by displaying the contents of the POST array.
    Once you have found out, you need to change the conditional
    statement
    that checks the form to check for either the name of the
    button or one
    of the mouse coordinates.
    By the way, you have a space in the name and ID. That's
    invalid. Form
    element names and IDs should never include spaces or special
    characters.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • How to install and use Flash Player with Windows 7 64-bit edition and Internet Explorer 8.

    1. Click the Start button.
    2. Search for Internet Explorer.
    3. Do not click on "Internet Explorer (64-bit)" or "Internet Explorer (No Add-ons).
    4. Click on "Internet Explorer."
    5. That will open Internet Explorer 8, 32-bit edition.
    6. Now you can download, install, and use Flash Player. (It is used automatically on websites that support it.)
    7. In the future, make sure you don't use Internet Explorer 64-bit edition. Delete any Internet Explorer shortcut icons that you were formally using. Make sure that any Internet Explorer icons that you now use, are opening the 32-bit edition. To see what edition you are using, click the question mark near the upper-right corner of a webpage and click "About Internet Explorer." If you don't see "64-bit" on the popup, that means you are using the 32-bit edition.

    If you can not see the moving sphere: http://kb2.adobe.com/cps/155/tn_15507.html
    Check the following:
    Enabling Flash Player in Internet Explorer 9
    ActiveX Filtering in Internet Explorer 9
    Also check this:
    In I.E.9, click Tools, click Internet options, click Security tab, ensure that the Internet security level is Medium-high.

  • How many computers can i install and use lightroom 5 with a single purchase?

    I've got 2 desktops and a laptop at home. Can i install lightroom 5 and use them on all 3 devices? The database is a cloud system or will it be in the local drive?

    you can concurrently install and activate on two computers.
    you can save files using adobe's cloud file service (mainly to sync your files) but you should always have local copies saved.

  • I want to use iMovie 6 on my new MacBook Pro running Lion 10.7.5. It won't download. Can I download Snow Leopard instead and use iMovie 6 with that older OS?

    I have a MacBook Pro I recently purchased 'cause my old G4 just couldn't output my video films properly. My new MacBook Pro is running 10.7.5 OS Lion. Don't like iMovie 11 and want to use iMovie 6. It won't download on Lion. Could I download Snow Leopard (deleting OS 10.7.5) and use iMovie 6 then? I saw a previous thread that said that could be done.

    AppleMan...I have the same iMac you have...i-7 16GB with a SSD....just bought it second hand and it is about 1.5 years old....it was maxed out with upgrades when the original owner bought it.  It was also restored back to factory settings prior to me taking possession. 
    I am making home movies in iMovie 11....max length 30 minutes or less.  I am totally new to this editing.  I am using HD footgage filmed from my Hero GoPro 3.  I am finding that the movies that I am creating are skipping, staggering, hanging up etc...usually where I had transitions.  I am certain I have enough power and memory in my iMac, so what's the issue?  I read one of your other posts about optimizing each event or clip to 1080p?  Is this what I need to do for every clip I import?  Can I do this for all the clips at once on import?  I also read that I may need to export the movie to quick time for smooth playback?? 
    Any help you can provide would be appreciated!
    Sincerely,
    Matt
    PS=How do I e mail you directly here in the posts?  I went to your profile but didn't see any "e mail" or "contact" member button to click on.

  • How to down load and using OpenStreetMap offline with LabVIEW 2013

    Dear All
    How can i download the OpenStreetMap  database and API for LabVIEW to call this offline map database !
    Thanks
    Luong.Tran
    Solved!
    Go to Solution.

    Hi Hockeyjim07
    I mean how can i use OpenStreetMap with offline mode. base on your link  it is required the computer have to access internet.  so my question is how can i download the OpenStreetMap database(pictures) and setup to offline mode and using OSM api to call the offline map?
    Thanks
    Luong.Tran

  • Keeping and using the comes with music license onc...

    if i buy a comes with music phone, but the online service isn't yet available to my country, can i keep the license and use it once the service is available to my country?
    Greece Nokia X6 RM-559 v40.0.002

    Hi,
    Most of the time, the reason behind this issue is that a user has 2 services subscribed into, a Comes With Music service and a Nokia Music Store Service. If you sign up and you are being charged, that indicates that you are on the Nokia Music Store.
    The best way to make sure that you are logging in to the correct service, make sure to click on the Comes With Music button and then click sign in. If it so happens that after doing so, you are still being charged, it could be that the username and password for your Comes With Music account is different. 
    You can ask Nokia Careline to assist you in retreiving these information. You would then receive it thru email with the correct username and the temporary password. The information you need to provide the representative for them to be able to pull up your account detail are:
    *IMEI
    *E-mail address
    *Mobile Number
    Hope this helps.
    Your Nokia Angel in disguise

  • How could I create ObjectInputStream and use it indefinitely with Servlets?

    Hi All,
    I would like to create the stream object between applet and server only once with urlConnection.openConnection() and use it to write objects to it indefinitely without reinstantiating it or getting another connection with urlConnection.openConnection() and repeatedly query for another input / output stream with servletOutputStream = new ObjectOutputStream (servletLinkup.getOutputStream()); How could this be done?
    Devyn

    Dear vladimp,
    The thing is, you need to ask good questions to receive good answers.Have you ever written a servlet vladimp? More specifically, have you ever written client - server code and have the two sides send objects to each other over the HTTP protocol?
    This question is directed towards those developers who have done similar code and may have suggestions regarding this post.
    What have you tried and how exactly has it failed for you?Quote from my post: "I would like to create the stream object between applet and server only once with urlConnection.openConnection() and use it to write objects to it indefinitely without reinstantiating it or getting another connection..." - that is, every time I want to write another object to the stream. Apparently whatever I tried didn't work, hence I'm posting here. Maybe someone with more servlet development experience would be willing to shed some light on this.
    Why do you think the overhead of wrapping ObjectInput/OutputStreams
    around the URL stream is large?Why do you believe I care if the overhead is large? My question is about maintaining a persistent connection to a servlet not overhead.
    Have you made use of OutputObjectStream.reset()?This is actually a legitimate question (even though it's an ObjectOutputStream not a OutputObjectStream). The answer is YES I tried and NO it didnt' work. Could be that anything sent has to be followed up by a .flush() or/and a .close() to actually trigger the stream to send the object. At least according to some sources (I'm trying to verify this).
    How about some sample code that reproduces the issue?URLConnection servletLinkup = urlConnection.openConnection();
    servletOutputStream = new ObjectOutputStream (servletLinkup.getOutputStream());
    Should be obvious for someone who did it before.
    What is it about this problem that warrants a post to Advanced
    Language Topics forum vs, say, Serialization forum?Testosterone driven guru java developers. Perhaps this could also go under the 'Java Servlet Technology' section as well, who knows, there's so many to choose from. I've actually gotten some very creative replies regarding this in other places. I can't say I didn't enjoy this post, however. 8^D. Thnx to all who have read the post.
    Devyn

  • Can unlocked iphone 5s be purchased in the U.S. and used in China with local networks?

    I was told that China is working with different network standards regarding mobile phones, so I was wondering if I could buy an unlocked iphone here and use it with a Chinese simcard (which are also different sizes...?)
    How would it work?
    Thanks!

    Hello Katze30,
    Thanks for using Apple Support Communities.
    To unlock your iPhone from your current carrier please follow the steps in the article below.
    iPhone: About unlocking
    http://support.apple.com/kb/HT5014
    Take care,
    Alex H.

Maybe you are looking for