Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 876607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:27:39+00:00 2026-05-15T11:27:39+00:00

For a project at university I plan to build an annotation based tool to

  • 0

For a project at university I plan to build an annotation based tool to visualize/play around with data structures.

Here’s my idea:

Students which want to try out their self-written data structures need to:

  • mark the type of their data structures using some sort of marker annotation e.g.

    @List
    public class MyList<E> { ... }
    

    so that I know how to represent the data structure

  • need to provide an iterator so that I can retrieve the elements in the right order

  • need to annotate methods for insertion and removal, e.g.

    @add public boolean insert(E e) { ... }
    

    so that I can “bind” that method to some button.

Do similar applications exist? I googled a little bit around but didn’t find anything like that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:27:40+00:00Added an answer on May 15, 2026 at 11:27 am

    I do not really understand why do you need to use Annotations for such a task? You will end up with some weird methods that your framework would not be able to parse, or will parse it the wrong way – bringing you to making up a set of rules how to properly write that methods so your framework could understand them.

    I think it is much better solution to use interfaces instead. Create your own interface called StudentList or something, with methods like getIterator, getIndex, etc. and make students implement this interface. Then you will be able to load any of that classes and use it based on the interface they implement.

    Also, you could just reuse avialable interfaces like List or Collection, however, this could make students write a lot of unused code to implement that interfaces. So I would rather go with writing my own interface.

    Example of such interface would be:

    interface StudentList<T> {
        public Iterator<T> getIterator();
        public T get(int index);
        public void add(T element);
        public void remove(T element);
    }
    

    Students would implement it like this (this example just wraps around ArrayList):

    class MyList<T> implements StudentList<T> {
        private ArrayList<T> realList;
    
        public MyList() {
            realList = new ArrayList<T>();
        }
    
        public void add(T element) {
            realList.add(element);
        }
    
        .......
    }
    

    And you would test it like this:

    void testList(StudentList<String> list) {
       list.add(5);
       list.add(10);
       list.get(20);
    }
    
    testList(new MyList<String>());
    

    Everything is clear both for students and for you this way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am about to start a project for university to build a procedural city
My next university project is going to be Java based. We will have to
I'm working on a university project that requires encrypted data to be sent from
I am currently doing a small data structures project, and I am trying to
I'm using POI to manipulate data in Excel files for a university project. I'm
I'm working on a university project which is based in cloudsim3.0 project. I'm using
For this university project I'm doing (for which I've made a couple of posts
I have a university project which is already 99% completed. It consists of two
I'm writing a C University project and stumbled upon a compiler behavior which I
I'm working for a university project, and I have the following question: I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.