Working with Classes and Arrays

hello to all,
public class Store
//private data
private Person list[];
private int count;
private int maxSize;
//constructor starts
public Store(int max)
count = Person.count(); //sets count to 0     
maxSize = max;//maxSize is equals to max
Person list[] = new Person[maxSize];
}//end of store
//constructor ends
//accessor starts   
public int getCount()
for(int i=0; i<list.length; i++)
int result = list;
return result;
}//returns the number of elements currently in store
the code above is working with classes and some arrays
what am trying to do is to display what the array holds
and then i meet an error saying that
INCOPATIBLE TYPES - FOUND PERSON BUT EXPECTED INT
Please note that am new to this!
Thank you in advanced!
<img src="file:///C:/Documents%20and%20Settings/fh84/Desktop/untitled.JPG" alt="" />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

public class Store
    //private data
    private Person list[];
    private int count;
    private int maxSize;
//constructor starts
    public Store(int max)
         count = Person.count(); //sets count to 0     
         maxSize = max;//maxSize is equals to max
        // Person list[] = new Person[maxSize];
         Person list[] = new Person[maxSize]; //set tne
    }//end of store
//constructor ends
//accessor starts  
    public int getCount()
        for(int i=0; i<list.length; i++)
            int  result = list;
return result;
am sending the code again                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • NXT Flatten to String Not Working with Clusters and Arrays

    Hello,
    My name is Joshua and I am from the FIRST Tech Challenge Team 4318, Green Machine. We are trying to write a program that will write to a configuration file and read it back. The idea is that we will be able to write to a config file from our computer that will be read by our autonomous program when it runs. This will define what the autonomous program does.
    The easiest way to do this seems to be flattening a data structure to a string, saving it to a file, and then reading back and unflattening it. The issue is that the flatten to string and unflatten from string VIs don't seem to work with arrays and clusters on the NXT. It does work when running on the computer. We've tried arrays, clusters, clusters in arrays and arrays in clusters, none seem to work. Thinking it was something to do with reading the string from a file, we tried bypassing the file functionality, still not working. It does work with basic data types though, such as strings and numbers.
    No error is thrown from what we can tell. All you get is a blank data structure out of the unflatten VI.
    The program attached is a test program I've been working on to get this functionality to work. It will display the hex content of what is going into the file, coming out of the file, and then the resulting data from the unflatten string, as well as any errors that have been thrown. The data type we are using simulates what we would like to store. There is also a file length in and out counter. The out file is a little larger because the NXT write file VI adds a new line character on to the end (thus the use of the strip white space VI). This character was corrupting even basic data types saved to file.
    I would like to know if there is a problem with what we are doing, or if it is simply not possible to flatten arrays on the NXT. Please ask if you have any questions about the code. Thank you in advanced!
    Joshua
    Attachments:
    ReadableTest.vi ‏20 KB

    Hi jfireball,
    This is a very interesting situation. Take a look at what kbbersch said. I also urge you to post in the FTC Forums. You posted your question to the general LabVIEW forums, but by posting to the FTC Forums, you will have access to others that are using the NXT hardware.
    David B.
    Applications Engineer
    National Instruments

  • What happens as we use strictfp modifier with class and interface ?

    I just knew that strictfp can't be used with variables?
    I want to know that why we use strictfp with class and interface?

    makpandian wrote:
    i hope i can understand if you explain myself.Okay, let me go ahead and try to explain yourself.
    The concept of a makpandian can be summed up as the following: a simple-minded, java forum-goer who posts questions directly from his SCJP 6 study guide in hopes that forum members will give him a simple answer that he can correlate to a multiple-choice response. By doing this, the makpandian suspects that passing the SCJP 6 exam will become a tangible reality, thus enabling it to obtain a job in the public work sector (given the great significance of this type of certification in the makpandian's presumed country of origin (India, for those of you who aren't following along)).
    So how'd I do? Did I do a good job of explaining yourself?

  • FaceTime no longer working with Yosemite and IOS 8.1

    I have used FaceTime flawlessly for some time with no issue.
    After I upgraded to Yosemite on my MacBookAir and IOS8.1 on 5S and iPad air, I've had a problem connecting.
    When I get a call, all the devices ring (as they should) but it will not connect on the first device I pick up on.  It says connecting
    but all the other devices keep ringing and finally it says I have a missed call.  The connection does not happen.  If I turn off
    all devices except one, it will work...... do we have a bug here??

    Thank you for responding to my issue.  I spent the better part of two hours trying to get this to work.  Bluetooth is enabled on all devices. Each computer is set in Preferences/General to allow Handoff.  All computers and iPhones are on the same WiFi network.  I toggled all of the major settings off and on.  Rebooted each of my computers several times. I finally conceded defeat.  Then my daughter asked to have a try at it.  She worked on the first MBP for about thirty minutes and informed me that she had gotten continuity to work.  And indeed, on her MBP late 2012 she is able to use the continuity features in both directions between her computer and her iPhone 6.  But it only works with Mail and Safari.  I asked how she accomplished this feat.  She said she turned off "everything" on her computer and iPhone (WiFi, Bluetooth, "Allow handoff" under Preferences/General) and then rebooted both the iPhone and the computer.  She then turned everything back on.  This worked for her.  So we tried the same thing on my MBP and iPhone 6.  Now continuity works partially. Email activity is mirrored on both the MBP and the iPhone regardless of which device initiates the continuity activity.  But Safari activity on the computer is mirrored on the iPhone but not in the opposite direction.  There is no continuity function for Pages in either direction.  The telephone connectivity works fine on all of my devices– 3 MBPs, Mac Pro, iPad Air, 2nd gen iPad and 3rd gen iPad.

  • Looking for an app that works with Mac and iPhone that will set calendar reminders of birthdays in contacts.

    Looking for an app that works with Mac and iPhone that will set calendar reminders of birthdays in contacts.

    Hi ron1098,
    Try my application Dates to iCal. it runs on the Mac, but you can sync the calendar to your iOS device.
    See more about Dates to iCal here. It is £4 shareware with a 2 week demo.
    Best wishes
    John M
    As I sell software on my site and ask for donations, the Apple Support Communities Use Agreement requires that I state that I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • Handoff not working with Yosemite and iOS 8

    I have three Macbook Pros in my household.  Two are mid 2012 models and the other a late 2012 model.  Each is supposed to support the handoff feature of Yosemite and ios8.  Everything seems to work properly between my daughter's late 2012 MBP and her iPhone 6.  But on the other two MBPs in our family the continuity feature does not work on either of them.  Receiving and sending calls works fine.  But the continuity does not work even though all three MBPs and all three iPhone 6 are on the same wifi network.
    I've tried all the suggestions that I could find.  Toggling off and on the various settings on the MBPs and the iPhones.
    John

    Thank you for responding to my issue.  I spent the better part of two hours trying to get this to work.  Bluetooth is enabled on all devices. Each computer is set in Preferences/General to allow Handoff.  All computers and iPhones are on the same WiFi network.  I toggled all of the major settings off and on.  Rebooted each of my computers several times. I finally conceded defeat.  Then my daughter asked to have a try at it.  She worked on the first MBP for about thirty minutes and informed me that she had gotten continuity to work.  And indeed, on her MBP late 2012 she is able to use the continuity features in both directions between her computer and her iPhone 6.  But it only works with Mail and Safari.  I asked how she accomplished this feat.  She said she turned off "everything" on her computer and iPhone (WiFi, Bluetooth, "Allow handoff" under Preferences/General) and then rebooted both the iPhone and the computer.  She then turned everything back on.  This worked for her.  So we tried the same thing on my MBP and iPhone 6.  Now continuity works partially. Email activity is mirrored on both the MBP and the iPhone regardless of which device initiates the continuity activity.  But Safari activity on the computer is mirrored on the iPhone but not in the opposite direction.  There is no continuity function for Pages in either direction.  The telephone connectivity works fine on all of my devices– 3 MBPs, Mac Pro, iPad Air, 2nd gen iPad and 3rd gen iPad.

  • I like the idea of auto back-up for my new iMac, Ipad and PC Netbook, particularly if I can access all files and data stored on any device.  But I have a Conceptronic router.  Will Time Capsule work with this and how?

    I like the idea of auto back-up for my new iMac, Ipad and PC Netbook, particularly if I can access all files and data stored on any device.  But I have a Conceptronic router.
    1. Will Time Capsule work with this and how?
    2. Can my printer USB be plugged in and then shared between the devices?
    3. Can I create a network and how?
    4.  What happend when a visitor logs onto my existing wireless router?
    I'm new to Macs (well a returning user having started with Mac Plus!!) and not very technical.  Any help / advice will be much appreciated.
    Ray

    The key to what you seem to want to do is to be able to get Apple's Time Capsule router to "join" the network that your Conceptronic router.  I believe that works with some third-party routers, but I've never seen a list of those that work in such a configuration and I have no experience with Conceptronic equipment.
    You might be better off with a Network-Attached Storage (NAS) device instead of a Time Capsule.

  • I am considering buying an iPad 3. I have an iMac with OSX 10.6.8. On the iMac I have many photos and work with iPhoto and Photoshop Elements on the computer. Can I interchange or transfer photos and other work from the iMac to the iPad? How?

    I am considering buying an iPad 3. I have an iMac with OSX 10.6.8. On the iMac I have many photos and work with iPhoto and Photoshop Elements on the computer. Can I interchange or transfer photos and other work from the iMac to the iPad? How?

    velma Monreal wrote:
    I am considering buying an iPad 3. I have an iMac with OSX 10.6.8. On the iMac I have many photos and work with iPhoto and Photoshop Elements on the computer. Can I interchange or transfer photos and other work from the iMac to the iPad? How?
    Yes you can. In iPhoto create a Album with the photos you want in it. You can drag them from your Events folder. In iTunes with your iPad connected go to Photos by cliking on your iPad. You can then select the album or events you want.

  • Hello, I have a Mac computer with NVIDIA 750M dedicated graphics card and monitor EIZO but the problem was there when I was working with Windows and Acer monitor. When I open a file from Camera Raw in PS this is smaller than the screen so I double-click w

    Hello, I have a Mac computer with NVIDIA 750M dedicated graphics card and monitor EIZO but the problem was there when I was working with Windows and Acer monitor. When I open a file from Camera Raw in PS this is smaller than the screen so I double-click with the tool "hand" to fit on the screen, but the picture loses sharpness and becomes blurry. If you magnify the image even only slightly with the tool "zoom" the picture comes back clear. In Camera Raw instead is always sharp. I solve the problem by turning off the graphics card in PS but often use plugin that need the graphics card otherwise the processing time is much longer. I ask for help.
    Thanks.

    Hello, I have a Mac computer with NVIDIA 750M dedicated graphics card and monitor EIZO but the problem was there when I was working with Windows and Acer monitor. When I open a file from Camera Raw in PS this is smaller than the screen so I double-click with the tool "hand" to fit on the screen, but the picture loses sharpness and becomes blurry. If you magnify the image even only slightly with the tool "zoom" the picture comes back clear. In Camera Raw instead is always sharp. I solve the problem by turning off the graphics card in PS but often use plugin that need the graphics card otherwise the processing time is much longer. I ask for help.
    Thanks.

  • Internal Microphone not working with Quicktime and some other apps, yet it does for Skype.

    Internal Microphone not working with Quicktime and some other apps, yet it does for Skype. 
    Microphone works fine with Quictime on another mac, so I do know how to use it. The one where it is not working (A) had an external microphone and camera attached earlier, and indeed it does work with that external microphone, but not with the internal microphone selected; and (B) had RealPlayer installed previously.
    Any suggestions, please?

    Hi,
    Download Audio driver from here.
    Intructions how to install it in Vista/Win7.
    Extract this driver with Winrar.
    Open Device manager and expand the Sound, video and game controllers section.
    Right click on Either the High Definition Audio Device if you have the generic Microsoft drivers, or the Conexant High Definition SmartAudio 221 if you have older Conexant drivers and choose "Update Driver Software..."
    Click Browse my computer for driver software, then click "Let me pick from a list of device drivers on my computer"
    Click "Have Disk..." then Browse to the folder where the drivers were extracted  .......\V64 for 64-bit Vista/Win7. Click OK.
    Select one of the "Conexant High Definition SmartAudio 221" models in the list, there will be multiple identical entries.
    Click Next, and you're done.
    I'm not sure which one from the list will work for You.
    This drivers weren't test. So if You will try them and it will work for You let us now about.
    ** Say thanks by clicking the "Thumb up" icon which is on the left. **
    ** Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue. **

  • Device not working with Log and Transfer in FCP

    I am trying to get some footage off my camera into final cut pro, but Final Cut Pro does not recognise my device when I try to use Log & Transfer
    The camera is question is a Cannon Legria FS20, here is a link
    http://www.canon.co.uk/ForHome/Product_Finder/Camcorders/flash_memory/LEGRIAFS20/
    I have looked around but can't seem to find any plug-ins to get it to work with Final Cut Pro, does anyone know any way I can get it to work with Log and Transfer
    Upon inspecting the hard drive, it saves video files in .MOD format with an .MOI file (which i assume is a metadata file
    How can I get it so that my device works with log and transfer?
    Thanks

    Hi -
    I did a little Google searching for information on your camera and it appears that it is a Standard Definition Camera that records in the MPEG-2 format.
    Log and Transfer only works with High Definition material.
    You will need to convert your video clips into a format that will work with FCP.
    I know nothing about working in PAL, but you want to download an free application called MPEG Streamclip from
    http://www.squared5.com/svideo/mpeg-streamclip-mac.html
    This application will convert your MPEG-2 files into a format that you can use directly in FCP.
    Once you have converted the files to Apple DV-PAL, with the correct frame rate (25fps?) and field dominance you can either simply drag the converted files into FCP or import them using File > Import.
    Hope this helps.
    MtD

  • HT4437 The airplay on my i pad works with music and pictures but I cannot get it to work with safari and mirroring.  Does anyone know what I could be doing wrong? Thanks!!

    The airplay on my i pad works with music and pictures but I cannot get it to work with safari and mirroring.  Can someone help me to get things working?  Thanks!

    As an IT person, I can put my hands up to the same difficulty.  Then on double clicking on Home button, find AirTV symbol amongst Music control
    Solved my problem having spent hours looking for a complicated answer.  Well done Apple for hiding it so well.
    Brian

  • Dear Apple's people, please note that "Lightning to 30 pin Adapter" don't work with iPhone5 and iPhone5s "Base Dock"  !!!!

    Dear Apple's people, please note that "Lightning to 30 pin Adapter" don't work with iPhone5 and iPhone5s "Base Dock"  !!!!

    Ho comprato un adattatore originale Apple "lighitning to 30 pin adapter" per poter usare i mei vecchi cavi dell'iPhone4 con il nuovo iPhone5.
    Se collego l'adattatore (con il vecchio cavo delliPhone4) direttamente all'iPhone5 , tutto funziona.
    Ma se collego l'adattatore (con il vecchio cavo delliPhone4) all'iPhone5 tramite la "base dock" , l'adattatore non viene riconosciuto e non funziona.
    Pensando che l'adattatore fosse rotto, ho riprovato con altri identici adattatori originali, ma il risultatato è lo stesso.
    Quindi penso che potrebbe essere un errore di progettazione della base dock che supporta unicamente la connessione diretta tramite un cavo lighning e non supporta la connessione se in mezzo c'è l'adattatore !!

  • I want to ask that i have passed my 10th and i am doing diploma in Mechanical Engineering. So i want to work with apple and wants to lean more from them. So how i can this company as a studying student?

    I want to ask that i have passed my 10th and i am doing diploma in Mechanical Engineering. So i want to work with apple and wants to lean more from them. So how i can this company as a studying student?

    [http://support.mozilla.com/en-US/kb/Managing+file+types]

  • Cannot print "working with files and folders htm

    When I try to print "Working with files-and-folders" from a Google search, it only prints part of it. I have changed my destination folder to no avail. Thank you or any help, Jack Menendez

    What's the best method for moving all my nonsystem related stuff over to this new driveIan has provided you with the best solution, SuperDuper.
    But if you have a 250 GB external, you really ought to clone your entire system,(only about 3 GB) so you have a backup.
    I keep mine with a complete clone of my internal, that way it is easy to boot from the external and run utilities like Disk Utility, TechToolPro, DiskWarrior, etc. on the internal and vice versa.
    If you run into a problem with say Preferences and don't know which one is the troublemaker, just trash the whole pref folder and use the good one from the clone. Font problem, same deal. And, if diaster ever strikes, you can just boot up from your external and keep right on working - fix the internal when you have time.
    That's my 2 cents anyway
    -mj
    [email protected]

Maybe you are looking for

  • Inconsistent Locking with Select for Update

    Hi, I seem to be having some issues in using SELECT FOR UPDATE and was hoping to get some insight from the Oralce Guru's out there. I have a J2EE application, running in WebLogic 8.1.4 using Oralce 9.2.0.1.0. The application contains code that requir

  • Mavericks crashes just after install 10.9.2

    Was running Microsoft Word 2011 for Mac 17" on my (MBP 17" early 2011) Also had Powerpoint open started doing the install 10.9.2 - it completed, was running fine for about 3 minutes. Then a series of vertical lines filled the screen about 5 mm wide g

  • Recovering dropped table without using pointing time recovery/

    Hi geeks, Noob here.I have a question*.I want to recover the dropped table with data with out using pointing time recovery.* for Ex:Use hasr dropped the table at 10:00 and realized that he dropped the table at 16:00hrs .So i want to fetch the data(DD

  • IPhoto or Aperture--Which work-flow?

    I have several thousand digital pics and some small video clips that need to be cataloged and managed in some type of database. I have some experience with: iPhoto, iViewMedia Pro and Aperture. I have use those applications; yet, I don't have enough

  • Movies won't load onto iTunes! Please help me, desperately seeking advice

    Hey all. I just bought a new macbook and new 60g iPod and can't watch movies on my pod. I try to move them into iTunes and nothing happens, won't drag and drop, won't work if I try import or try to crtl click open with. Just zero happens. I have also