r/JavaProgramming • • 1d ago

I have to develop a final project for my Object-Oriented Programming (OOP) course using Java. Can you suggest some creative and interesting project ideas? I want to build something different from the usual management systems. Please suggest a project that meets typical university project requirement

/r/NUML/comments/1y1blog/i_have_to_develop_a_final_project_for_my/
1 Upvotes

2 comments sorted by

1

u/Minecraftian14 1d ago

You can try building a Matrix Math library (including a demonstration).

Basically you can have Matrix as an abstract class, which is then inherited by several other classes to represent different kinds of storage methods or different kinds of operations like transpose.

For example there can be a ArrayMatrix class, which stores an n-dimensional matrix using a single large 1D array.

Another method of storage is for a SparseMatrix, where you use the triplet format.

The main Matrix class has method declarations for operations like get and set and these two matrix classes will implement those. A good example of inheritance.

Coming back to the transpose method, it returns an instance of TransposeImage, which is another implementation of Matrix and has a Matrix field to store the matrix from where transpose was called. (The get and set methods only interchange the coords and then call on the get or set of the metrix field.) A good example of Composition.

1

u/Minecraftian14 1d ago

This is also a good example of abstraction since the matrix class exposes common methods like get, set, and size or shape.

And this is also a good example for polymorphism as the different implementations can be treated uniformly as a Matrix object .

Finally depending on how big you want this project to be, you can implement other operations like slicing, addition, multiplication, broadcasting, and so on.