Found 9321 Articles for Object Oriented Programming

How to Create a Simple Program in C++?

Nancy Den
Updated on 26-Feb-2020 10:54:10

150 Views

To get a very simple program in C++, you'll first need to set it up and then create programs for it. The following steps list how to get started in C++ using a very simple program.Get a C++ CompilerThis is the first step you'd want to do before starting learning to program in C++. There are good free C++ compilers available for all major OS platforms. Download one that suits your platform or you can use the tutorialspoint.com's online compiler on https://www.tutorialspoint.com/compile_cpp_online.phpGCC − GCC is the GNU Compiler chain that is basically a collection of a bunch of different compilers ... Read More

How to Get Started with C++ Programming?

Daniol Thomas
Updated on 10-Feb-2020 11:12:51

553 Views

So you've decided to learn how to program in C++ but don't know where to start. Here's a brief overview of how you can get started.Get a C++ CompilerThis is the first step you'd want to do before starting learning to program in C++. There are good free C++ compilers available for all major OS platforms. Download one that suits your platform or you can use the tutorialspoint.com's online compiler on https://www.tutorialspoint.com/compile_cpp_online.phpGCC − GCC is the GNU Compiler chain that is basically a collection of a bunch of different compilers created by GNU. You can download and install this compiler ... Read More

What are the applications of C++ programming?

Krantik Chavan
Updated on 10-Feb-2020 11:05:19

2K+ Views

C++ is a widely used programming language that is used for writing large-scale commercial applications for end-users. Some of the major applications built using C++ by major software vendors and giants are −Google − Google file system, Google Chromium browser, and MapReduce large cluster data processing are all written in C++.Mozilla − Mozilla Firefox and Thunderbird email chat client are both written using C++.MySQL − MySQL, an open source DBMS is written using C++.Microsoft − Many windows apps that you regularly use are written in C++.Rockstar Games − Almost all major game companies use C++ due to its sheer speed ... Read More

What is object-oriented programming (OOP)?

Moumita
Updated on 10-Feb-2020 11:00:45

12K+ Views

Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which may contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods. For example, a person is an object which has certain properties such as height, gender, age, etc. It also has certain methods such as move, talk, and so on.ObjectThis is the basic unit of object-oriented programming. That is both data and function that operate on data are bundled as a unit called an object.ClassWhen you define a class, you define a blueprint for ... Read More

What is C++ programming language?

Paul Richard
Updated on 10-Feb-2020 10:58:50

4K+ Views

C++ is a programming language developed by Bjarne Stroustrup in 1979 at Bell Labs. C++ is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features. It is a superset of C, and that virtually any legal C program is a legal C++ program. C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.It is a language that is − Statically typed − A programming language is claimed to use static typing when type checking is performed during compile-time as opposed to run-time. Compiled − A compiled ... Read More

What does the >> operator do in Python?

Pythonista
Updated on 26-Feb-2020 07:38:32

325 Views

It is a bitwise right shift operator. The bit pattern is shifted towards right by number of places stipulated by operand on right. Bits on left are set to 0For example a=60 (00111100 in binary), a>>2 will result in 15 (00001111 in binary)>>> a=60 >>> bin(a)result #39;0b111100' >>> b=a>>2 >>> bin(b) '0b1111'

Converting Strings to Numbers and Vice Versa in Java.

Sravani S
Updated on 26-Feb-2020 09:51:01

1K+ Views

Java lang package provides Integer class which has methods to convert an integer to String and vice versa. You can convert a String to an integer using the parseInt() method and Integer to String using the toString() method.ExampleLive Demopublic class Sample {    public static void main(String args[]){       String str = "1212";       int num = Integer.parseInt(str);       System.out.println(num);       String st = Integer.toString(num);       System.out.println();    } }Output1212

How to Convert Double to String to Double in Java?

V Jyothi
Updated on 26-Feb-2020 09:51:54

203 Views

Java lang package provides a Double class which has methods to convert Double to String and vice versa. You can convert a String to a double using the parseDouble() method and double to String using the toString() methodExampleLive Demopublic class StringDouble {    public static void main(String args[]){       Double data1 = 2.2;       String str = Double.toString(data1);       System.out.println(str);       Double data2 = Double.parseDouble(str);       System.out.println(data2);    } }Output2.2 2.2

Data Conversion Using valueOf() In Java.

Priya Pallavi
Updated on 26-Feb-2020 09:53:23

145 Views

Java String class provides several variants of valueOf() method. These accept various data types and convert them into String.ExampleLive Demopublic class Sample {    public static void main(String args[]){       int i = 200;       float f = 12.0f;       char c = 's';       char[] ch = {'h', 'e', 'l', 'l', 'o'};       String data = String.valueOf(i);       System.out.println(String.valueOf(i));       System.out.println(String.valueOf(f));       System.out.println(String.valueOf(c));       System.out.println(String.valueOf(ch));    } }Output200 12.0 s hello

What is the difference between String.valueOf() and toString() in Java?

Nikitha N
Updated on 26-Feb-2020 09:56:04

1K+ Views

The toString() method of the String class returns itself a string.ExampleLive Demoimport java.io.*; public class Test {    public static void main(String args[]) {       String Str = new String("Welcome to Tutorialspoint.com");       System.out.print("Return Value :");       System.out.println(Str.toString());    } }OutputReturn Value :Welcome to Tutorialspoint.comThe value of method variants of the String class accepts different variables such as integer, float, boolean etc.. and converts them into String.ExampleLive Demopublic class Sample {    public static void main(String args[]){       int i = 200;       float f = 12.0f;       ... Read More

Advertisements