Pls Help asap

Hi
I have an assignment due today at midnight, I need some help please please....
the assignment is about implementing a tow-dimensional sparsearrays using LinkedList
here is what I've got so far and I am not even sure
import java.*;
public class SparseMatrix implements SparseMatrixInterface{
//members
     private Object defaultValue = 0;
     private List[] rowHead = null;
     private List[] colHead = null;
     private List current = null;
     private List previous = null;
     private Object value = null;
//constructor
     public SparseMatrix(int rIndex, int cIndex)
          if(rIndex <= 0) System.exit(rIndex);
          if(cIndex <= 0) System.exit(cIndex);
          rowHead = new List[rIndex];
          colHead = new List[cIndex];
//SparseMatrixInterface
//iterateRow(), iterateCol() should return another iterator
     @Override
     public Object defaultValue() {return defaultValue;}
     @Override
     public RowIterator iterateRow() {return null;}
     @Override
     public ColIterator iterateCol() {return null;}
     @Override
     public Object fetch(int row, int col) {
          do{
          if((row == current.row) && (col == current.col)) {return current.value;}
          current =  current.next;}
          while(row < current.row && col <  current.col && current.next != defaultValue);
          return defaultValue;}
     @Override
     public void store(int row, int col, Object value) {}
//methods
     private void display(){int count = 0; List value; System.out.println();}
     private void addRow(int rIndex, Object value){}
     private void addColumn(int cIndex, Object value){}
     private int getRowCount(int cIndex){return List[rIndex].length;}
     private int getColumnCount(int cIndex){return List[cIndex].length;}
//Colterator class
//next() should return another iterator
     private class Colterator
          public boolean hasNext() {return current != null && current.next != null;}
          public ElementIterator next() {return null;}
//RowIterator class
//next() should return another iterator
     private class RowIterator
          public boolean hasNext() {return current != null && current.next != null;}
          public ElementIterator next() {return null;}
//ElementIterator
//iteratingRow() true if a call to next from ColIterator
//iteratingCol()   true if a call to next from RowIterator
     private class ElementIterator implements MatrixInterface
         public boolean iteratingRow() {return true;}
         public boolean iteratingCol() {return true;}
         public int nonIteratingIndex() {
              if (iteratingRow())return rIndex();
              if (iteratingCol())return cIndex();
               return 0;}
          public boolean hasNext() {
               return current.getRow() != 0 && current.next.getRow() != 0
                    || current.getCol() != 0 && current.next.getCol() != 0;}
          public MatrixInterface next() {
               if(hasNext() == true) previous = current; current = current.getNext();
               return (MatrixInterface) current.value;}
//MatrixInterface
         public int rIndex() {return current.getRow();}
         public int cIndex() {return current.getCol();}
         public Object value() {return null;}
//nested class
     private class List{
          private List next = null;
          private int row = 0;
          private int col = 0;
          private Object value = null;
          public void setNext(List next)          {this.next = next;}
          public void setRow(int row)          {this.row = row;}
          public void setCol(int col)          {this.col = col;}
          public void setValue(Object value)  {this.value = value;}
          public List getNext()               {return next;}
          public int getRow()               {return row;}
          public int getCol()               {return col;}
          public Object getValue()          {return value;}
}please fill in the missing parts
I really appreciate it.
you can email me at [email protected]

Let me just post a couple of important parts of the [FAQ's|http://wikis.sun.com/display/SunForums/Forums.sun.com+FAQ] of Sun's forum:
Be thorough and precise: Proofread your question before posting. Describe the steps that you have taken. The more effort you put into researching and describing your problem, the more likely you will get a sincere effort in return.
Post a subject line that describes the problem: Experts in your subject may skim right past subject lines like "Urgent" and "Need help ASAP". Use keywords about the technologies instead.
Post a problem, not an assignment: Break your assignment down into specific problems that you can ask for help with. Dorm hall lounges may be a better resource if you have a last minute, "urgent" demand for solutions to homework problems.

Similar Messages

  • My safari browser is not loading any thing after an update 5.1!! i had to create guest account to brows!! pls help ASAP!!

    my safari browser is not loading any thing after an update 5.1!! i had to create guest account to brows!! pls help ASAP!!

    my safari browser is not loading any thing after an update 5.1!! i had to create guest account to brows!! pls help ASAP!!

  • SQL query...pls help ASAP

    Actor (Aname: varchar(40), Ano: varchar(6)) Ano is pk
    Movie (Mname: varchar(40),mno: varchar(8)) Mno is pk
    PlayIn (Ano, Mno, Pay: Integer) Ano and Mno are fk referencing Acotr and Movie respectively.
    Actor(Aname, Ano)
    A Bingo, A1
    B Castro, A2
    C Katie, A3
    S Hommy, A4
    J Tammy, A5
    K loren, A6
    Movie(Mname, Mno)
    Gladiator, M1
    Cast, M2
    Dog, M3
    Jilters, M4
    PlayIn(Ano,Mno,Pay)
    A1 M1 800
    A1 M2 1500
    A2 M2 78
    A2 M3 1750
    A2 M4 2301
    A3 M2 904
    A3 M3 629
    A4 M2 565
    A4 M3 5695
    A4 M4 1255
    A5 M1 989
    A5 M4 238
    A6 M2 137
    A6 M3 236
    A6 M4 545
    QUESTION: write SQL query to find the names of actors who earned less than 'B Castro' in each movie that 'B Castro' played in.

    thanks so so much.....
    another question:
    for each movie, list the movie number, the average
    pay and the total number of actors in the movie.....Rather than just asking homework questions and expecting everyone else to do your work for you, why don't you at least have a go at it yourself and post the query that you've tried, then we'll tell you where you are going wrong. You won't learn anything if we just write it for you.
    Also, your use of "pls help ASAP" in the subject title is not polite.
    This forum is manned by volunteers who have their own jobs and offer their help free of charge.
    Everyone who posts an issue on here would love to have it answered as soon as possible, but nobody has the right to assume that their issue is any more important, urgent or requires a quicker answer than anybody elses.
    If you need urgent help then you should pay someone to do the work for you.

  • COOIS report pls help ASAP

    HI...
    I want to modify 'coois' report but i am not able to find the final output table in it.
    Production Order number appears at output screen, i've to display SO NO and SO item which is there in Production order in the output list.
    Pls Help ASAP...
    Pts rewarded for more helpful ans for sure...
    Best regards
    Snehal

    Hello.
    Have a look into include LCOISOUTPUTF04, form pbo_0100, field symbol <table>. Insert a break-point in line 121:
    <ls_detail_list>-list->set_initial_data(
    Please, have in mind that this is a standard report before changing it.
    Regards.
    Valter Oliveira.

  • Reconfiguring JCo (Urgent Pls Help ASAP)

    Dear all,
    My back-end CRM system is getting migrated. So IP, username, password, client will get change.
    Now I have currently imported 8-10 RFC models from this existing CRM system. I have one JCo configured for the same.
    So if i change the existing JCo's settings (IP, username, password, Client etc) from Wed Dynpro Content Administrator for new system, then will those model work? Or I have to re-import the models again???
    Pls help me asap as I have to convey estimated system downtime to business.
    Thank you in advance.
    Regards,
    Amey

    So if i change the existing JCo's settings (IP, username, password, Client etc) from Wed Dynpro Content Administrator for new system, then will those model work? Or I have to re-import the models again???
    Yes. we can change JCo settings to point a different system
    if signature of RFC are same in both CRM instance, there is no need of re-import.
    Best Regards,
    nikhil

  • Add to Cart button has stopped working - pls help asap...

    Hi,
    My Add to Cart - {tag_buynow} - has stopped working sometime today and doesn't add to cart or take me there.
    I've tried it on all browsers and on different machines/mobile and it doesn't work (and tried changing it to {tag_addtocart} but makes no difference).
    Please tell me what's going on ASAP as this is a live site and my livelihood!!!
    http://tinyurl.com/k5d7po6
    Kind regards,
    Frank.

    Thanks Liam,
    Once again you are the only person on here who gives any kind of meaningful reply (although I don't understand it!!).
    Pls can you expand on what you wrote and suggest a solution (btw I chose Bc because I am not very experienced at webdev and know next to nothing about js).
    I received this message from the support ticket I submitted:
    "I have escalated this ticket to our Engineering team for a more detailed investigation.
    We will keep you informed on any new developments on this issue. In the meanwhile, please try adding {module_shoppingcartsummary} to the Shopping template/layout that should fix the problem."
    I have added {module_shoppingcartsummary} to the page content layout (and hidden it with js because I don't need it) and it seems to be working again.
    I really don't like the flakeyness of Bc - this issue might have lost new customers (or made existing ones think we are muppets).
    Kind regards,
    Frank.

  • Just got a new iPhone 4s and i took pictures on the phone but as soon as i take them and turn my phone off the pictures appear blurred although on photo roll it shows hw they orginally looked, pls help asap my phone is literally 3days old

    just gt a new iphone 4s 3days ago and the camera seems to be giving me problems wen i take a picture the focus is blured although on the camera roll it is shown as clear .

    -> Transfer content from an iPhone, iPad, or iPod touch to a new device

  • SQL help ASAP plz!

    Hello! :)
    I'll try to describe my problem. So let's assume that I have a function that recursively calls itself. In this function first i do an executequery, and while i 'browse' through the resultset(for eg.: while (rs.next())), i make updates (updatequeries) on those records too. I wanted to make it faster, and i decided to do one connection (for eg.: conMain) and one statement (for eg.: stmtMain), and do all executequeries and executeupdates via this stmtMain. And it didn't work well. My code runs well only on the first row of the rs.next(), and call itself recursively, but only on the first row, in every while(rs.next()). And i think after finishing, and stepping back from recursion, it doesn't get the rs's next row (rs.next()). So I thought about maybe the updatequeries and executequeries doesn't fit next to each other or what!? So i made 2 public statments one is stmtMain and one is execStatement for example. And i used stmtMain for executeupdates, and execStatement for executequeries. And it still didn't work well! I tried out, that i get out recurcion(so only call the function once), and then on the first Resultset the while(rs.next()) stepped through ALL the rows properly. So as i saw the recursion somehow makes the resultset's next() value FALSE!? I haven't tried out yet, to make statements in every call of that recursive function, but i think it'd work. But i think that would slow down the whole source. I read somewhere that a statement can handle lots of resultsets and so, but in this case it seemed that if i call recursively that function, after stepping back, the while(rs.next()) gives false (or what!?), and not stepping to the next record, as it DOES if there's no recursion.
    Huh, i hope i've made myself clear, sorry for my english, and maybe i haven't read the documents well or so, but i'm a bit angry i spent my whole last night trying to fix this problem, and discover the problem.
    pls help asap :)
    thanks
    athalay

    well, I'll try to explain it a bit more. So I have records named 'catalog'. And this record type has fields: parentid (this points to another 'catalog' record) and catalogdesc (the description of the catalog). The catalogdesc contains the description PLUS before the description, a prefix. As you can see in books, prefix for example: 1.2.2.1 etc. So I want to modify the prefix (which is included in the 'catalogdesc' field) of the childs BASED on the parent's prefix. But in the beginning the parent's prefix is changed too! (example, because a catalog before itself has been deleted) So I have to modify all of it's children's prefix, and their childrens and theirs etc. You see now!? So this is why I do an executequery(which selects the parent's childs), I go into the while(rs.next()) loop, I do an executeupdate(to update the children's prefix based on their parent's), and then call this funtion on them, because they have childrens too!
    This is why I need recursion, I hope it's clearer now.
    So I still need help :/
    thanks
    athalay

  • Audio+Video Chat works but one small problem.Pls help.

    HI..
    as i had posted once before in a different query's thread, i have implemented audio and video chat using AVTRansmit2 and avreceive2.
    audio and video chat work well.By video chat i mean not only video but VIDEO+AUDIO as well.. just like usual yahoo video chat.
    But the problem is like this:-=
    I have given an option for user to switch from audio chat to video chat.
    now if a user first goes to audio chat and then switched to video chat,
    then the problem comes. When he's shifted to video chat i close down previous Audio chat by RTPManager.dispose() , i close the player and everything..
    and then i start Video transmit/receive "ALONG WITH" audio transmit/receive..
    No this time video starts but audio doesnt work ..
    it says"waiting for rtp data to arrive.... "
    The problem is that when this new stream of audio data comes, the receiver somehow thinks that its the same old stream since its from same transmitter IP.. and so it tries to UPDATE the previous stream.
    It means there is some problem with the close method or RTPManager.dispose() which should have disposed off all the stuff much before the new connection was made.
    PLS HELP ASAP>
    this is crunch time for my project.

    Hi anandreyvk . .
    well, i had tried doing removetargets and also, i had disposed RTPManager well. As it turns out the problem was not with any of it but it was the problem of me incorrectly passing RTPManager from AVReceive2 to AVTransmit2.
    Actually i am using just one RTPManager.. since i am receiving and transmitting on the same port.
    i've solved the problem but i am not sure if this is the right way .. what do you think ??
    is creating just one RTPManager {by that,i mean initializing it only once} a good idea ?? Since we are supposed to call both AVTransmit2 and AVReceive2 with the "LOCAL PORT" .. {which in itself is a matter of discussion though! } i and my project mate thought initializing RTPManager only once is a better option .
    Whats your take on all of this ?

  • Hi friends pls help me ASAP

    Hi..
       I learned abap in a good institute. I feel comfortable in abap. Now i want to make job trails in hr-abap. But i dont have vast hr knowledge. i know only the creation of infotypes and preparing reports with few infotypes. Now  why i posted this question is, Can we prepare hr module for abap-hr job trails individually without training. Regarding abap-hr I have sufficient material(including seimens) with me. Can we prepare hr abap individually? Can anybody pls tell me some tips how to Prepare abap(hr module) completely? Pls help me.
    Regards
    Yuktha

    Study HR business process and search for problems encountered by some of the conusultants

  • X3-1 problem..pls help me :(

    how can i reset my nokia x3 in off mode????
    i cannot start using my x3 because of the security code..
    i enter my right code,, but still " security code error""
    i also already try to enter 12345 code,,,but it still same..
    some1 pls help me...ASAP!! TQ

    Leave the battery, sim card out for 10 min. Then try again. Doesn't work then wait for some more time. If it still doesn't work, someone may have changed the code without your knowledge. Your only solution is going to the Authorised Nokia Care. Pls take a proof of purchase along with you.
    Please mark the post as solution if it solves your problem.
    Current Device - Nokia Lumia 1020/920

  • Cannot upload my profile pic in orkut ,but can through IE.pls help.

    i a unable to upload the profole pic in orkut when using mozilla 3.6.3 , but does not have any such prob when using firefox 3.0.19 or IE. Pls help on this issue ASAP.
    == This happened ==
    Every time Firefox opened

    Is that upload done via a regular Browse button like for attachments on the forum or via a Java applet?
    If the latter is the case then make sure that Java is installed and working.
    See [[Java]]
    http://www.java.com/en/download/help/testvm.xml - How do I test whether Java is working on my computer? - 1.4.2_xx, 1.5.0, 6.0
    http://www.java.com/en/download/installed.jsp - Verify Java Version

  • HT4623 Unable to update. Error. Pls help.

    Unable to check for update. This message prompted when updating. Pls help. How to go about it.

    Are u going reply anytime soon. I need to solve this ASAP. I'm at wifi area....

  • I need an application which turn off wifi automaticly when my Ipod Toch is locked (for save battery charge), i hate every time to turn it off manually please help ASAP!!!

    I need an application which turn off WiFi automaticly when my Ipod Toch is locked (for save battery charge)
    I hate every time to turn it off manually when I go sleep please help ASAP!!!
    If I forget to turn of wifi on my device after my 8hour dream it's battery will be discharged. and ofcourse alert do not ring. pls help urgent!!!
    Thanks

    Suggestion:
    Turn off your device before bed.

  • Pls help me writing logic:iterate tag in jsp page

    Hey guys , I am struck in retriving string p1,p2,p3 in the jsp page
    Pls have a look ata the code
    In DAO class:-
    StdprdDAO.java
    Public arrayList getPFP()
    ArrayList a = new ArrayList();
    While(rs.next())
         columnsVO colVO = new columnsVO;
         colVO.setProduct(rset.getString(1));//will store in String colProduct
         colVO.setFamily(rset.getString(2));//will store in String colFamily
    colVO.setPrice(rset.getString(3));//will store in String colPrice
    a.add(colVO);
    return a;
    In Action Class:-
    ArrayList final = null;
    StdprdDAO DAO = new stdprdDAO();
    final = DAO.getPFP();
    For(int i = 0; final !=null && i<final.size() ; i++)
         columnsVO VO = null;
         VO = (columnsVO)final.get(i);
         String p1 = (String) VO.getProduct();
         String p2 = (String) VO.getFamily();
         String p3 = (String) VO.getPrice();
         Request.setAttribute(“p1”,p1);
         Request.setAttribute(“p2”,p2);
         Request.setAttribute(“p3”,p3);
    In JSP PAGE:-
    id = “columnsVO”>
    <bean:write name = “columnsVO” property=”final” id=”p1”>
    but still I am doubting my above sentences in jsp page ,so pls correct them if possible.
    Instead of l;ogic:iterate can I use directly getattribute(“p1”)? <logic:iterate
    Still I m doubting I can not utilize columnsVO file in logic:iterate, I can utilize only formbean file.
    So pls help me with this.

    May I ask why have you done it?
    If it is related to printing of the list then it is of no use.But it IS of use. The objects compEmployees is in scope.
    It has the list we want to print out.
    With logic:iterate:
    <table>
         <tr>
           <th>Number</th>
           <th>Employee</th>
         </tr>
         <logic:iterate name="compEmployees" property="totalEmps" id="emp">
              <tr>
                <td>
                  <bean:write name="emp" property="empNo"/>
                </td>
                <td>
                  <bean:write name="emp" property="empName"/>
                </td>
              </tr>
         </logic:iterate>
    </table>or alternatively with JSTL and c:forEach
    <table>
         <tr>
           <th>Number</th>
           <th>Employee</th>
         </tr>
         <c:forEach items="${compEmployees.totalEmps}" var="emp">
              <tr>
                <td>
                  <c:out value="${emp.empNo}"/>
                </td>
                <td>
                  <c:out value="${emp.empName}"/>
                </td>
              </tr>
         </c:forEach>
    </table>Cheers,
    evnafets

Maybe you are looking for

  • Style.css compatibility

    This may be a silly question, but I am trying to figure out what is wrong with my style.css file.I'm new at this and I'm getting compatibility issues with a color selection that I'm using and I don't know why. Dreamweaver is saying that it is incompa

  • Recently imported images not displayed automatically

    When I import images from a card reader the Organizer no longer automatically shows the recently imported images.  In order to view them I must do Find on Untagged items.  I thought I was selecting to turn off  the dialog box asking whether I want re

  • Nikon P7800 RAW files

    Nikon P7800 RAW files are not showing up in Lightroom or Bridge.  CC says all aps are up to date, and Adobe site says Camera 8.3 update is available.  But when I open ACR it iss showing verion 8.2. Is the file viewer and RAW converter for NRW files f

  • IPad 3rd Generation 64GB crashing when updating apps

    Ever since updating to iOS 7 (and subsequently 7.0.3 and 7.0.4) I find that whenever I update multiple apps on my ipad 3rd generation I suffer multiple freezes & reboots. Any suggestions on how to resolve this would be greatly appreciated or failing

  • Please add a "CC 2014 compatible" filter to the add-ons browser

    Hi, Now that almost all existing extensions are incompatible with PS CC 2014 (thanks a lot for this strange move), it would be useful to add a corresponding filter in the add-ons browser. Currently, you can only discover that an extension is not comp