Abstract Classes in C#

karthikeya Boyini
Updated on 19-Jun-2020 07:34:12

2K+ Views

An abstract class in C# includes abstract and non-abstract methods. A class is declared abstract to be an abstract class. You cannot instantiate an abstract class.Let us see an example, wherein we have an abstract class Vehicle and abstract method display()−public abstract class Vehicle {    public abstract void display(); } The abstract class has derived classes: Bus, Car, and  Motorcycle. The following is an implementation of the Bus derived class −public class Bus : Vehicle {    public override void display() {       Console.WriteLine("Bus");    } } ExampleLet us see the complete example of abstract classes in C# −Live ... Read More

Asynchronous Programming in C# using Async and Await Keyword

Samual Sam
Updated on 19-Jun-2020 07:33:17

2K+ Views

Asynchronous programming in C# is an efficient approach towards activities blocked or access is delayed. If an activity is blocked like this in a synchronous process, then the complete application waits and it takes more time. The application stops responding. Using the asynchronous approach, the applications continue with other tasks as well.The async and await keywords in C# are used in async programming. Using them, you can work with .NET Framework resources, .NET Core, etc.  Asynchronous methods defined using the async keyword are called async methods.An application with a GUI, check the content of the queue and if an unprocessed ... Read More

Access Modifiers in C#

karthikeya Boyini
Updated on 19-Jun-2020 07:32:31

685 Views

Access Modifiers specifies the scope of variable and functions in C#. The following are the access modifiers used provided by C#:PublicThe public modifier sets no restriction on the access of members.ProtectedAccess limited to the derived class or class definition.InternalThe Internal access modifier access within the program that has its declaration.Protected internalIt has both the access specifiers provided by protected and internal access modifiers.PrivateLimited only inside the class in which it is declared. The members specified as private cannot be accessed outside the class.ExampleLet us see an example of protected access modifier, accessing the protected members −Live Demousing System; namespace MySpecifiers ... Read More

Array of Arrays (Double) in C#

Samual Sam
Updated on 19-Jun-2020 07:31:53

1K+ Views

Arrays of arrays in C# are known as Jagged Arrays. To declare jagged arrays, use the double [ ][ ].Let us now declare them −int [][] marks;Now, let us initialize it, wherein marks are arrays of 5 integers −int[][] marks = new int[][]{new int[]{ 90, 95 }, new int[]{ 89, 94 }, new int[]{ 78, 87 }, new int[]{ 76, 68 }, new int[]{ 98, 91 } };ExampleLet us now see the complete example of jagged arrays in C# and learn how to implement it −Live Demousing System; namespace MyApplication {    class MyDemoClass {       static void ... Read More

Calculate Natural Logarithm of a Number in JavaScript

vanithasree
Updated on 19-Jun-2020 07:31:41

2K+ Views

To calculate the ln of a given number, use the Math.log() method in JavaScript. This method returns the natural logarithm (base E) of a number. If the value of a number is negative, the return value is always NaN.ExampleYou can try to run the following code to get the ln of a given number −           JavaScript Math log() Method                        var value = Math.log(2);          document.write("Value : " + value );          

One-to-Many Relationship Model

karthikeya Boyini
Updated on 19-Jun-2020 07:28:29

5K+ Views

In a "class roster" database, a teacher may teach zero or more classes, while a class is taught by one (and only one) teacher. In a "company" database, a manager manages zero or more employees, while an employee is managed by one (and only one) manager. In a "product sales" database, a customer may place many orders; while an order is placed by one particular customer. This kind of relationship is known as one-to-many.The one-to-many relationship cannot be represented in a single table. For example, in a "class roster" database, we may begin with a table called Teachers, which stores ... Read More

Hierarchical Database Model

Samual Sam
Updated on 19-Jun-2020 07:27:24

18K+ Views

A hierarchical model represents the data in a tree-like structure in which there is a single parent for each record. To maintain order there is a sort field which keeps sibling nodes into a recorded manner. These types of models are designed basically for the early mainframe database management systems, like the Information Management System (IMS) by IBM.This model structure allows the one-to-one and a one-to-many relationship between two/ various types of data. This structure is very helpful in describing many relationships in the real world; table of contents, any nested and sorted information.The hierarchical structure is used as the ... Read More

Get Base 10 Logarithms of E in JavaScript

Ramu Prasad
Updated on 19-Jun-2020 07:22:18

344 Views

To get base 10 logarithms of E, use the Math LOG10E property. It returns base 10 logarithm of E which is approximately 0.434.ExampleYou can try to run the following code to get base 10 logarithms of E in JavaScript −           JavaScript Math LOG10E Property                        var property_value = Math.LOG10E          document.write("Property Value: " + property_value);          

Bandwidth Limited Signals

Samual Sam
Updated on 19-Jun-2020 07:22:14

4K+ Views

Bandwidth The range of frequencies that are used for transmitting a signal without being substantially attenuated is called the bandwidth. It is calculated as the difference between the highest and the lowest frequencies. It is expressed in Hertz (Hz).For example, if the minimum frequency is 100 Hz and the maximum frequency is 1000 Hz, the bandwidth will be 900 Hz.The bandwidth of a transmission medium is the frequency width of the medium and is dependent upon its physical characteristics like thickness, material, length etc. For example, the bandwidth of a coaxial cable is 750 MHz ( MegaHertz).BasebandBaseband transmissions are those requiring ... Read More

Reserved Keywords in C++

Arjun Thakur
Updated on 19-Jun-2020 05:31:50

10K+ Views

A reserved word is a word that cannot be used as an identifier, such as the name of a variable, function, or label – it is "reserved from use". This is a syntactic definition, and a reserved word may have no meaning.There are a total of 95 reserved words in C++. The reserved words of C++ may be conveniently placed into several groups. In the first group, we put those that were also present in the C programming language and have been carried over into C++. There are 32 of these. There are another 30 reserved words that were not in ... Read More

Advertisements