1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Tanzania [10]
3 years ago
13

What are the three fundamental features of anobject-oriented programming language?

Computers and Technology
1 answer:
hjlf3 years ago
6 0

Answer:

  1. Inheritance
  2. Data abstraction or Data encapsulation
  3. Polymorphism.

Explanation:

The three fundamental features of an object oriented programming language are written above.

1. Inheritance:It is the mechanism when a class acquires the properties of some other class.The class which acquires the properties is called the child class and the class from which properties are inherited is called the base class.

2. Data encapsulation is clubbing different types of data in one place.That what class does .It can contain different data types in one place and those variables can be public ,private or protected.

3.Polymorphism it the property when an entity is processed in more than one form.Either be it run time or compile time polymorphism .

You might be interested in
Tricia listed her assets and liabilities. Credit Card Bill Car Loan Bonds Piano Bank Account Bicycle Which are Tricia’s liabilit
DIA [1.3K]
<span>Her liabilities are her credit card bill and her car loan. These are things that she owes and has to pay off, so they are liabilities due to the fact that she owes for these items. Her bonds, piano, bank account, and bicycle are counted as assets.</span>
7 0
3 years ago
Read 2 more answers
Create a game that rolls two dies (number from 1 to 6 on the side) sequentially for 10 times (use loop). If at least once out of
Alex73 [517]

Answer:

Explanation:

The following code is written in Java and loops through 10 times. Each time generating 2 random dice rolls. If the sum is 10 it breaks the loop and outputs a "You Win" statement. Otherwise, it outputs "You Lose"

import java.util.Random;

class Brainly {

   public static void main(String[] args) {

       UseRandom useRandom = new UseRandom();

       boolean youWin = false;

       for (int x = 0; x<10; x++) {

           int num1 = useRandom.getRandom(6);

           int num2 = useRandom.getRandom(6);

           if ((num1 + num2) == 10) {

               System.out.println("Number 1: " + num1);

               System.out.println("Number 2: " + num2);

               System.out.println("You Win");

               youWin = true;

               break;

           }

       }

       if (youWin == false) {

           System.out.println("You Lose");

       }

   }

}

class UseRandom{

   public int getRandom(int n)

   {

       Random r=new Random();

       int rand=r.nextInt(n);

       return rand;

   }}

8 0
3 years ago
Task 1 – File Input
e-lub [12.9K]

Answer:

Check the explanation

Explanation:

using System;

using System.IO;

                 

public class Program

{

 

  public static void Main()

  {

      string[] lines;

      Console.WriteLine("enter name of the file");

      String fileName=Console.ReadLine();

     

      Console.WriteLine("enter path of the file");

      String filePath=Console.ReadLine();

     

      using (StreamReader streamReader = File.OpenText(filePath))

      {

          String text = streamReader.ReadToEnd();

          lines = File.ReadAllLines(filePath);

      }

      Console.WriteLine("Enter path of the file to write");

      String outputFilePath = Console.ReadLine();

      bool fileExist = File.Exists(outputFilePath);

      if (fileExist)

      {      

                  overWriteOrChangeFileName(outputFilePath);          

      }

      else

      {

          File.Create(outputFilePath);

          File.WriteAllLines(outputFilePath, lines);

      }

      Console.Write("Input file Path"+filePath);

      Console.Write("output file path"+outputFilePath);

     

      void overWriteOrChangeFileName(String filePathtoCheck){

          Console.WriteLine("File exists. Do you want to overwrite the file or do you want to change the location and file name of the new file.Press Y to overwrite and press C to change the location and filename");

          String userInput=Console.ReadLine();

          if(userInput.Equals("Y")){

File.WriteAllLines(outputFilePath, lines);

          }else{

              Console.WriteLine("enter new path of the file including filename");

              String NewFileName=Console.ReadLine();

              outputFilePath=NewFileName;

              if(File.Exists(outputFilePath)){

                  overWriteOrChangeFileName(outputFilePath);                  

              }

              else

      {

          File.Create(outputFilePath);

          File.WriteAllLines(outputFilePath, lines);

      }

          }

      }

  }

 

}

3 0
3 years ago
A coworker asks your opinion about how to minimize ActiveX attacks while she browses the Internet using Internet Explorer. The c
iogann1982 [59]

Answer:

a. Security tab

Explanation:

These options would be under the security tab. The security tab allows you to protect yourself when browsing the web. It includes features such as cookies, location, pop-up blocker and tracking protection. This allows you to avoid harmful or malicious content. In this example, your coworker wants to minimize attacks when using the Internet. Therefore, this is the tab that would help her the most.

7 0
3 years ago
What does this loop that uses a range function do? for i in range(7, 15): print("goodbye") It prints "goodbye" 8 times, numbered
goldfiish [28.3K]

Answer:

It prints "goodbye" 8 times.

Explanation:

The loop being described in this scenario would print "goodbye" 8 times. It would not include numbers detailing the range since the loop instructions only state for the system to print("goodbye") and nothing else. Also, it would only print it 8 times because in a range the endpoint is not included, this is mainly because in programming data structures tend to run on 0-based indexing.

6 0
2 years ago
Read 2 more answers
Other questions:
  • W jakim celu powstawały pieśni żołnierskie i partyzanckie?
    10·1 answer
  • With a _____ network connection, the computers and other devices on the network are physically connected via cabling to the netw
    10·2 answers
  • Technician A says that the ECT and IAT sensors can be tested by using a digital multimeter or a scan tool. Technician B says tha
    12·1 answer
  • Harold included an excerpt from an Internet magazine in an article he wrote for the school newspaper. However, he did not ask pe
    13·2 answers
  • How do u know when a website doesnt like u?
    11·1 answer
  • O Why was the Internet originally constructed? Oto enable researchers to communicate
    6·2 answers
  • Give four advantages for ssd compared to hdd
    15·2 answers
  • Give three examples of NON-TRADITIONAL web authoring tools<br> 3 pour
    14·1 answer
  • What are 3 customizations that can be done using the header/footer section in the customize reports tray?.
    14·1 answer
  • write a function named get majority last name that accepts as its parameter a dictionary from strings to strings the keys of the
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!