Hi all,
How can I use linked list for files ,,
For example :
Class C extends B
Class B extends A
So, if I want to reference to C and when deleted extends from first statement , the inheritance must be stoped and not point to B ...
Can I use linked list for this ? And how can do this ?...I mean that : C→B, B→A
So B is sharing between them and if I delete it
The relation come be C→A.
can I use linked list or recursion for this ?

Recommended Answers

All 8 Replies

Sorry, but this makes no sense at all. Are we talking about files or classes? Can you give more details or better examples?

I am sorry ,, yes I mean classes that extends each other (inheritance among them by keyword extends),, so , I want to compute coupling classes for example :
class A extends B
class B extends C
Class C extends D
.....and so on ...
Now , how can compute coupling classes ??
for above example the coupling classes are (B, C) can I compute this number of coupling and how can I do this .?

Ok,Thank you very much..this link very useful to me,,.
Now , i read txt file line by line ,,,how can i put lines of this file in array 3D ??

package m;
public class m{
public static void main(String[] args) throws IOException {

try
    {
        FileReader frout = new FileReader("C:/filenew.txt");
        BufferedReader brout = new BufferedReader(frout);
        line = brout.readLine();

        while (line != null)
                { 
           System.out.println(line);

            line = brout.readLine();
                }      

    }catch (IOException e) {
        e.printStackTrace();
    } }}

How is reading lines in an array on topic? I see you've made a lot of posts all about metrics and writing your own code but how did you get this far without reading a file? Something's fishy here.

Sorry, I am working on more than one code ,
one for classes and inheritance and other interested in array , so I post about this , but the link for measures is very useful thank you for your help. .

Some folk don't want to stay on topic. This is technical enough as it is but if you change topics, it becomes a royal mess. You may disagree but from what I know about forums, one topic per discussion. Keep it clean and tidy.

I am sorry,you are right,thank you for your advise ...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.