Menu Close

Use of Visualization Tools – BlurJ in Object-Oriented Programming (MDM) Course

Author: Ms. Reva S. Patil

Course: Object-Oriented Programming (MDM-I)
Class: Second Year Sem-III
Department: Department of Computer Science & Engineering (Artificial Intelligence and
Machine Learning)

Programming is a significant component in software-related branches, and understanding and visualizing the concepts in these courses often requires more time. Now as the NEP structure is implemented for S.Y B.Tech students, so its becomes very complex to convince hard-branch students about these concepts of programming. In Computer Science, the Object-Oriented Programming course is one of them where we design the programming solution to a real-time
problem. Here we have used one teaching-learning tools to understand the nature, working, and systematic implementation of the problem by visualizing it.
In regular lectures, students get bored after 30 mins so it will affect the teacher to manage a class of 70 students. That’s why the effective use of any Learning tools is beneficial in this situation. Integrating learning tools into an Object-Oriented course can enhance student engagement and substitute a more interactive learning environment. This techniques were used during the lecture for S.Y BTech students.
An ATL technique like visualization tools significantly enhances the teaching of programming courses by providing interactive, graphical representations of code, algorithms, and program execution. As students are from hard branches this BlurJ tool helps them to understand how object-oriented concepts like inheritance actually work behind with practical examples.

Procedure:
• BlueJ:
BlueJ is an educational integrated development environment (IDE) specifically designed for teaching Java programming. It features a simplified interface with visualizations, including a class diagram and object interaction diagram, to help beginners in understanding objectoriented concepts. BlueJ supports interactive coding, debugging, and visual representation of Java classes and objects. The tool is known for its simplicity and suitability for introductory
Java courses.
Activity Plan: –
• Download BlueJ tool website: https://www.bluej.org/
• Run and start the application
• Fig 1 shows the homepage of BlurJ app
• Implementation of Inheritance and Polymorphism Concepts

Figure 1. Homepage of BlueJ Tool

• Inheritance
Inheritance is the feature of object-oriented JAVA and Python Programming. Here simple example of inheritance is demonstrated and its class and subclass relationships are also generated.


Example – College scenario with classes College, Department, and Student hierarchy.
• Go with the New Class and create the Superclass (College):
• Go with Create a subclass Department that extends the College class:
• Go with Create another subclass Student that extends the Department class:
• Create objects of the Student class and test the inherited methods:
• Go with Compile and run the CollegeMain class to observe the output.

This example demonstrates multiple levels of inheritance in a college scenario, where a student inherits the properties of the department, and the department inherits the properties of the college. Each class generates a separate file of its c program at the back end where we only need to add our variables declaration and method and object creation. Each subclass introduces its own details while reusing functionality from its superclass. The displayStudentDetails method showcases the inherited information from all levels of the hierarchy. Figure 2 shows a snapshot of simple inheritance implementation on the BlurJ tool.

Figure 2. Simple Inheritance Visualization on BlueJ Activity

In Figure 2. The left scenario shows the superclass and subclass hierarchy and the right part shows its programming implementation. This will help students for a better understanding of what and how inheritance actually work in programming. Figure 3 is a generated class diagram of the above example on BlurJ, the arrows represent inheritance relationships. The Department class inherits from the College class, and the student class inherits from the Department class. This hierarchy reflects the structure of the example with a college, department, and student. In BlurJ tool for every example respective class diagram and class hierarchy is generated this will help beginners for better understanding of concepts of object orientation in JAVA programming.

Figure 3. Simple Inheritance Class and Attribute hierarchy on BlueJ

• Polymorphism
Polymorphism in BlueJ is demonstrated through method overriding. In the context of our college example, let’s modify the Department class to include a polymorphic method display Details. Each subclass (CSE, IT, AIML, MECH) will override this method to provide specific details for that department.


Activity Plan: –
A simple example on BlueJ to demonstrate polymorphism in the context of a college scenario. We have to create classes for College, Department, and subclasses for CSE, IT, AIML, and MECH representing different departments under the college.
• Go with create a new class and make it as a superclass (College):
• Go with create a new class and make it as subclass under the department which
extended from the College class:
• Go with create class and make subclasses (CSE, IT, AIML, MECH) which all
extend from the Department class:
• Now create objects of different department classes and test polymorphism:
• Go with compile and run the CollegeMain where all objects and methods are
written and observe the output.

When we create classes and subclasses automatically a c program is created. Double-click on any class rectangle we will get that created program of the respective class. In this c program, we just need to add our variable declarations and method declarations as it vary from application to application. In this example, polymorphism is demonstrated through the display Department method, which takes a department object as a parameter. The method can be called
with objects of any subclass of Department (CSE, IT, AIML, MECH), showcasing polymorphic behavior. Figure 4 shows a snapshot of simple showcases of polymorphic behaviour in BlueJ where super and sub-classes are connected with the main class.

Figure 4. Polymorphism Visualization on BlueJ Activity

The arrows represent relationships among classes and subclasses. The departments (CSE, IT, AIML, MECH) extend from the department class and the department class inherits from the College class. This hierarchy reflects the structure of the polymorphism nature in object orientation. In BlurJ tool for every example respective class diagram and class hierarchy are generated this will help beginners for better understanding of concepts of object orientation in JAVA programming which is shown in Figure 5

Figure 5. Generated C program of Polymorphism on BlueJ

Figure 6 is the class hierarchy generated on BlurJ tool where CSE, IT, AIML, and MECH are subclasses of the Department class. The department is a subclass of the College class. Arrows represent inheritance relationships. The + symbol indicates public visibility. This hierarchy reflects the structure of the example with a college, different departments, and specific departments like Computer Science and Engineering (CSE), Information Technology (IT),
Artificial Intelligence and Machine Learning (AIML), and Mechanical Engineering (MECH). This will help beginners with a better understanding of concepts of object-orientated JAVA.

Figure 6. Generated Polymorphism Class and Attribute Hierarchy on BlueJ

Conclusion:
As students are from hard branches effective use of BlurJ learning tools helps them to understand basic concepts Object-Oriented Programming (MDM-I) courses with visualization. As this course has no practical slots only theory sessions, the use of BlueJ Tools helps a lot for a better understanding of concepts of Java programming and python programming. This helps us to engage students throughout the session which makes the session very interesting