Nishtha Thakur has Published 557 Articles

How to prevent class inheritance in C++

Nishtha Thakur

Nishtha Thakur

Updated on 11-Dec-2024 09:52:41

1K+ Views

Here we will see how to prevent inheritance in C++. The concept of preventing inheritance is known as the final class. In Java or C#, we can use final classes. In C++ there are no such direct ways. Here we will see how to simulate the final class in C++. ... Read More

Structure vs class in C++

Nishtha Thakur

Nishtha Thakur

Updated on 03-Dec-2024 09:42:07

226 Views

In C++ the structure and class are basically the same. But there are some minor differences. These differences are like below. The class members are private by default, but members of structures are public. Let us see these two codes to see the differences. Example Code for Class Here is ... Read More

C++ Program to Implement B Tree

Nishtha Thakur

Nishtha Thakur

Updated on 03-Dec-2024 09:41:19

6K+ Views

The B-tree is a generalization of a binary search tree in that a node can have more than two children. It is basically a self-balancing tree data structure that maintains sorted data and allows sequential access, searches, insertions, and deletions in logarithmic time. Here is a C++ program to implement ... Read More

Private Destructor in C++

Nishtha Thakur

Nishtha Thakur

Updated on 19-Nov-2024 18:21:52

809 Views

In C++, a private destructor is a destructor that is declared within a private access specifier, which means that the destructor cannot be accessed or called directly outside the class, which is useful for design patterns where the user wants to control how and when an object will destroy. Syntax ... Read More

Java program to create three vertical columns with equal number of buttons in GridLayout

Nishtha Thakur

Nishtha Thakur

Updated on 18-Nov-2024 22:29:08

288 Views

In this article, we will learn how to create a Java program that arranges buttons in three vertical columns with an equal number of buttons using GridLayout. The GridLayout class allows us to arrange components in a grid format, which makes it ideal for creating a uniform layout of buttons. ... Read More

How to set preferred size for BoxLayout Manager in Java?

Nishtha Thakur

Nishtha Thakur

Updated on 29-Oct-2024 00:37:55

1K+ Views

In this article, we will learn to set the preferred size for a panel within a JFrame using the BoxLayout manager in Java Swing. By setting the preferred and maximum size for the panel, we can control the layout’s appearance, ensuring that the panel maintains a consistent size as other ... Read More

Java program to change the background color of rows in a JTable

Nishtha Thakur

Nishtha Thakur

Updated on 23-Sep-2024 19:08:45

1K+ Views

In this program, we will create a JTable and change the background color of its rows. A JTable is used to display data in a tabular format, and by adjusting its properties, we can modify its appearance. The goal of this program is to set a custom background color for ... Read More

How to read/parse JSON array using Java?

Nishtha Thakur

Nishtha Thakur

Updated on 31-Oct-2023 14:38:33

58K+ Views

A Json array is an ordered collection of values that are enclosed in square brackets i.e. it begins with ‘[’ and ends with ‘]’. The values in the arrays are separated by ‘, ’ (comma).Sample JSON array{    "books": [ Java, JavaFX, Hbase, Cassandra, WebGL, JOGL] }The json-simple is a ... Read More

High-level Data Link Control (HDLC)

Nishtha Thakur

Nishtha Thakur

Updated on 31-Oct-2023 04:57:51

145K+ Views

High-level Data Link Control (HDLC) is a group of communication protocols of the data link layer for transmitting data between network points or nodes. Since it is a data link protocol, data is organized into frames. A frame is transmitted via the network to the destination that verifies its successful ... Read More

Pure Virtual Functions and Abstract Classes in C++

Nishtha Thakur

Nishtha Thakur

Updated on 07-Oct-2023 02:39:22

24K+ Views

A pure virtual function is a virtual function in C++ for which we need not to write any function definition and only we have to declare it. It is declared by assigning 0 in the declaration. An abstract class is a class in C++ which have at least one pure ... Read More

1 2 3 4 5 ... 56 Next
Advertisements