Motorola Mobility Interview Question: Design file system using OO... | Glassdoor

Interview Question

Senior Software Engineer Interview Sunnyvale, CA

Design file system using OO

Answer

Interview Answer

1 Answer

0

Using composite pattern:

class FileNode {
  String name;
}

class File extends FileNode {
  long size;
}

class Folder extends FileNode {
  Collection children;
}

Romain on Sep 12, 2010

Add Answers or Comments

To comment on this, Sign In or Sign Up.