How would i create this

Hello
I am required to make a program with a loop which records new records broken at a carnival. Someone will input the new record and holder and when the loop is ended it will display all the records, like a printout.
I'm fairly new to java, is there anyway this can easily be done?
Thanks

I have this so far
import java.util.ArrayList;
public class Person
    public static void main (String[] args)
            int print = 0;
            ArrayList alist1 = new ArrayList();
            //loop here
        System.out.print ("Enter a record");
}I dont know what loop to use and how to use the array list, i have read it i just quite dont get it
Message was edited by:
Mike334

Similar Messages

  • How would I create this sort of effect?

    I have attached an image and I need to know how to create this sort of border around a text....
    If anyone could give an "idiots" guide that would be great!!
    I really have tried but don't seem to be getting anywhere and i'm sure there's an easy shortcut somewhere.

    You can have a stroke that fills in the open spaces within ("the counters") by adding a pathfinder effect to the mix - I wrote up a tutorial here: http://www.illustratorhints.com/2010/05/fill-in-the-counters-on-live-text/
    Actually, that shows your whole question I think - I used offset fills instead of strokes, but the idea is the same.

  • How would you create this effect?

    I am curious if there is a fairly straight-foward away of creating the effect seen in this image. I am talking about the pixelated effect made up of many little red boxes of various hues at the top part of the image.
    I was thinking of zooming in real close to an image in photoshop and doing a screen capture, but I'd rather have a vector image that can be easily scaled in size and easy to change the hue to different colors.
    Something like this able to be done in illustrator without building it a box at a time?
    Regards,

    Well I'd say that PDF is a vector.
    The PDF contains nothing other than a raster image. It contains no vector paths.
    (By the way: "A vector" is a single expression of a direction. Calling a vector-based illustration "a vector" is like calling a raster-based image "a pixel.")
    I zoomed in as close as I could and didn't see any pixels.
    All you could see is pixels. That's all that's there.
    If it's raster I'd be interested in knowing what resolution...
    Its resolution is 1. It's a single-pixel raster image (as given away in its title).
    I've never experienced a raster image that didn't get more pixelated the larger you scaled it up.
    Yes, you have. That's exactly what I demonstrated in post 5 and in the PDF.
    The operative word in your comment is more pixelated. That misconception is the point of the demonstration. Your image is already pixelated, and that's exactly what you want. It won't be "more" pixelated whatsoever, no matter how large you scale it.
    At the heart of the [quite common] misconception is this: What you are calling "resolution" is not. True resolution is the measure of the amount of information contained. A raster image contains only a fixed amount of information. PPI is merely a scale factor. It's merely an expression of information density, not quantity. As you can see, that PDF is every bit as "resolution independent" (i.e.; scaleable) as a vector square.
    The same priciple applies to your raster image. Your whole intent in your posted example is to display pixelation. So if the very thing you're trying to depict is the pixelation of, say, a 10 pixel x 20 pixel raster image, then all you need in order to depict that at any scale is a 10 pixel by 20 pixel raster image. At a scale of 10 PPI, you've got a perfect depiction of 10 square Pixels Per Inch. At a scale of 200%, you've got a perfect depiction of 5 square Pixels Per Inch (i.e.; 10 Pixels Per 2 Inches). You can scale it to the size of the moon and you'll have a perfect depiction of 10 Pixels Per Moon. It's just as scaleable as a 10 x 20 array of vector squares.
    In other words: All the actual resolution of your raster image (all its information—all its pixels, in all their squareness) is already visible. Reducing its information density (by scaling it larger) will not reveal more of its actual information (the square shape of its pixels—the information that one usually wants to conceal or disguize about raster images, but not in this case).
    The whole purpose of making sure your raster images have "sufficient resolution" in desktop publishing is to disguise the squareness of their pixels (what is commonly called "pixelation"). But that is exactly what you are intending to depict in this case. And you want to be able to depict that with equal clarity at any scale. There's no need to re-draw it as vector paths in order to do that. In this situation, you are not trying to avoid "pixelation," you are trying to show it, which is exactly what a raster image does by its nature.
    Think of it this way: If all you are trying to draw is 200 squares, it can easily be argued that a raster image is more "data efficient" than a file containing 200 square vector paths. For each vector path, you have to include four coordinate pairs (800 anchor points). For a raster image, all you need is 200 color values.
    This is not just a symantic or academic or pompous know-it-all point of argument. It's a point widely applicable to many common situations, and something every graphics professional should understand. For example, consider the software instructions author who pointlessly frets over the misunderstood "requirement" for pixel density when his illustrations necessarily consist of screenshots that are, after all, supposed to accurately and clearly depict what the user sees on his screen. Or the fact that you see single-pixel raster images scaled to the full width of the page, or dimensions of a table cell or large section of a whole background on web pages everyday. Or the widespread misconception that intentionally fuzzy raster effects like soft drop shapows "require" 300 PPI.
    JET

  • How would I create this effect in PhotoShop?

    I essentially want to create the effect of the person in the window with the rain, but I can't seem to get it right, any tips? Many thanks in advance!

    I only have an image of the person who will be in the picture and the following image of rain on a window.

  • How would I create this kind of smart playlist?

    top 100 most played songs exclude films, tv programmes and podcasts.

    Match rule:
    Playlist is Music
    Limit to 100 items by most often played.

  • How would I create this sort of line?

    (the one following the arrows)

    Hello swampertchamp.
    Try using the 'Width Tool'.
    Hope diagram below is of use.
    TREX

  • HT4191 iPhone Local Storage "My iPhone" - How do you create this folder for use by the Notes app on a iPhone or iPad?  If I want to keep some notes only on my device and not in a cloud environment associated with an e-mail account.

    iPhone Local Storage "My iPhone" - How do you create this folder for use by the Notes app on a iPhone or iPad?  If I want to keep some notes only on my device and not in a cloud environment associated with an e-mail account.  I've seen reference to the  "My iPhone" local storage put no mention on how you create this folder or access this folder within the Notes app.  I realize storing information in a local storage like this provides no syncing between other iDevices but that is exactly what I'm looking for.  I'm running iOS7.0.4 on a iPhone 5S, and a iPad Air.  Any help would be greatly appreciated.

    If you go to Settings > Notes > Default Account you will see "On My iPhone" as the default account and the only choice if you have not enabled syncing Notes in Settings >iCloud or Settings > Mail, Contacts, Calendars. If you have enabled syncing you can still select "On My iPhone" as the default account. When you are in the Notes app you won't see any accounts listed if you have not enabled syncing because they are all in the On My iPhone account and that is the only place possible. It is not a folder that you create.

  • Is it possible to install windows 7 on my macbook from a removable hard drive using boot camp? How would I do this?

    Is it possible to install windows 7 on my macbook from a removable hard drive using boot camp?
    How would I do this?

    If you have Lion installed, and run Boot Camp, it will create the boot flash for you, just followe the tutorial on screen. As far as I remember, this was not possible prior to Lion.

  • How would I create buttons states for MCs I am creating abstract MCs

    I am creating a generic website that would have abstract MCs that would load jpg or TXT fields for the user interface to allow for fast updates to the site. The MCs that would make up the user interface would be empty and load things into it using XML or PHP later on. How would I create button states for the user interface MCs.  I started creating a function for every MC button state but I thought there might be a more efficient way.
    would creating a array help in this case?
    and is using URLRequest the way to link to pages with in a movie well the flash movie that is the site it's self?
    /*---------------------------- THE START OF MY ACTION SCRIPT ------------------------------*/
    var waywardLogo_mc:MovieClip = new MovieClip;
    var theCollection_mc:MovieClip = new MovieClip;
    var newsPage_mc:MovieClip = new MovieClip;
    var whatthe#$@!doyouwant!?_mc:MovieClip = new MovieClip;
    /*---------------------------- onOver ------------------------------*/
    waywardLogo_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
    theCollection_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
    newspage_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
    whatthe#$@!doyouwant!?_mc.addEventListener(MouseEvent.ROLL_OVER,onOver);
    /*---------------------------- onOut ------------------------------*/
    waywardLogo_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
    theCollection_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
    newspage_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
    whatthe#$@!doyouwant!?_mc.addEventListener(MouseEvent.ROLL_OUT,onOut);
    /*---------------------------- onClick ------------------------------*/
    waywardLogo_mc.addEventListener(MouseEvent.CLICK,onClick);
    theCollection_mc.addEventListener(MouseEvent.CLICK,onClick);
    newspage_mc.addEventListener(MouseEvent.CLICK,onClick);
    whatthe#$@!doyouwant!?_mc.addEventListener(MouseEvent.CLICK,onClick);
    function onOver(event:MouseEvent):void
    event.target.alpha = .5;
    function onOut(event:MouseEvent):void
    event.target.alpha = 1;
    function onClick(event:MouseEvent):void
    event.target.URLRequest("");
    /*---------------------------- onover, onOut, onClick buttonModes ------------------------------*/
    waywardLogo_mc.buttonMode = true;
    theCollection_mc.buttonMode = true;
    newspage_mc.buttonMode = true;
    whatthe#$@!doyouwant!?_mc.buttonMode = true;

    click insert/new symbol, tick movieclip, assign a name, tick export for actionscript and in the class textfield enter a name (say ButtonClass) and click ok.
    attached to the first frame of your new movieclip, type stop() in the actions panel.  put whatever graphic you want on-stage for your button's up stage.  create another keyframe, label it "over" and put whatever graphic you want for button's over state on-stage.
    in a layer above those graphics, you'll probably want to add a dynamic textfield so each of your buttons can have different text.  assign the textfield and instance name (say tf) and extend its timeline to the last frame of your movieclip button.
    then when you want to create a button, on your timeline you can use:
    var b:ButtonClass=new ButtonClass();  // these two lines need to be entered for each button
    buttonhandlerF(b,someX,someY);
    //-------code between dotted lines only needs to be entered once no matter how many buttons you add --------------------
    function buttonhandlerF(b:ButtonClass,x:Number,y:Number){
    b.addEventListener(MouseEvent.MOUSE_OVER,overF);
    b.addEventListener(MouseEVent.MOUSE_OUT,outF);
    b.x=x
    b.y=y
    addChild(b);
    function overF(e:MouseEvent){
    e.currentTarget.gotoAndStop("over");
    function outF(e:MouseEvent){
    e.currentTarget.gotoAndStop(1);
    //-------code between dotted lines only needs to be entered once --------------------
    // you'll also want to create a click listener and listener function
    the code between the dotted lines is amenable to being added to a ButtonClass.as class file if want to expand your capabilities.

  • I share my iTunes with my family's iPods.  We all buy music on our iPod's and would like to transfer the purchases to the iTunes library.  How would we do this?

    I share my iTunes with my family's iPod's.  We all buy music seperately on our own iPod and would like to transfer the music to our iTunes library, how would we do this?

    Oh jeez, that was simple. Thanks!

  • My ipod was stolen, can I find out what the serial number of it is, based on looking at a connection history in my itunes? How would I do this? I didn't register it.

    My ipod was stolen, can I find out what the serial number of it is, based on looking at a connection history in my itunes? How would I do this? I didn't register it. I think I found the guy selling it, just looking to confirm the serial number and I'll make a phone call to the police.
    Thanks

    kevilay2013 wrote:
    is this possible?
    Yes.
    Open iTunes on the computer you used to sync the iPod and select Preferences… from the iTunes menu.
    Select the Devices pane. Position the cursor over any of its backups. The iPod's serial number will appear in a popup window.

  • If i want to contact apple with an idea i have for a new feature for the iphone how would i do this?

    if i want to contact apple with an idea i have for a new feature for the iphone how would i do this?

    A quick google search would have revealed the answer.
    http://www.apple.com/feedback/iphone.html

  • HT1349 My Macbook Pro was stolen and I need the serial number. How would I find this? I need it for the police report so if I could get answers soon that would be great, thanks :)

    How would I find this? I need it for the police report so if I could get answers soon that would be great, thanks

    Lanlani wrote:
    ... It there any other solution ?
    Consider using this site: http://www.stolenlostfound.org/
    This is Apple's official word on the subject:
    Reporting a lost or stolen Apple product
    If you have lost or found an Apple product, please contact your local law enforcement agency to report it. Although Apple does not have a process to track or flag lost or stolen product, you can use My Support Profile to find a list of serial numbers for items purchased or registered with your Apple ID.

  • I am considering switching from MIE to Firefox. But I need to use an outdated version (7.3.1) of QuickTime, and I do not want Firefox to update it. If I installed Firefox, how would I prevent this?

    I am considering switching from MIE to Firefox. But I need to use an outdated version (7.3.1) of QuickTime, and I do not want Firefox to update it. If I installed Firefox, how would I prevent this?

    Firefox doesn't update plugins like that. The worst you might see is a "nag" from Firefox after an update, about that plugin being outdated; and you can dismiss that "nag" by just closing it.

  • How would I do this?

    I have to say I'm completely lost. I need to make two files - WordFrequencyAnalyzer.java that has all the functions and TestWordFrequencyAnalyzer.java that should be a GUI that calls the first one. I know how to make GUIs without a problem but its these functions that baffle me.
    This is what I need to do - WordFrequencyAnalyzer.java needs to have a constructor that opens us a text file and reads it and saves what is needed for analysis. This is what I have:
    public void WordFrequencyAnalyzer(String filename) throws IOException
         {//Constructor.  Uses file name to open file reads it, saving what is needed, then closes the file.
               BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(filename))));
         }Now these are killing me:
    public int frequency(String word)
    *****This needs to be able to check the number of times the particular word occurs in the file. How would I do this? Please help give me a clue. The next few seem to tie in together if I could figure out how to do one of them.
    public String mostFrequentWord()
    //The word that occurs most often in the file
    public String[] wordsOccurringAtLeast(int minimumNumberOfTimes)
    //An array, alphabetized, of all the words occurring at least the given minimum number of times...I'd figure I'd use a search and compare method here.
    public int numberOfWords()
    //The number of words (counted once each) in the file
    public String toString()
    //Returns a string which, when printed, will show two columns, with a word on each line on the left and its frequency on the right. The result must be alphabetized.
    Who could give me some pointers. I don't want the code done for me because I need to learn too. Do I need to put the data from the text file into a Collection interface in the java.util package or should I use something else?? And how would I go about doing something like that?
    Thank you very much,
    Henry

    I modified the code above for the Hashtable to a Collection and came up with this and emailed him:
         What about this:
         Collection words = new Collection();
         String line;
         while ((line = br.readLine()) != null)
         StringTokenizer st = new StringTokenizer(line);
         while (st.hasNext())
         { words.add(st.next().toString());
         Storing in a Collection is what you want right? I don't want to do something that you don't approve of. I remember the time I used a Hashtable and you didn't like it. ...
    This is his response:
    As for your suggested solution: A collection is a good idea, but Collection is
    an interface, so you can't do anything like
    Collection words = new Collection();
    You must figure out what kind of collection to use. And here's a hint about
    something else:
    If every time you see a word like "the" you store it in the collection, you'll
    have two problems: the word will be stored over and over, which is inefficient
    use of space, and your program will have to do a lot of repetitive work to
    implement the methods, which is inefficient use of time.
    I new he wanted a Collection. I'm starting to know him a little better now I guess, which still doesn't help as much. If anyone has any ideas please post - this is all new to me. Does anyone know the best kind of Collection to use as he put it?
    Thanks,
    Henry

Maybe you are looking for