What are the oop concept of java

Answers

Answer 1

Answer: OOP concepts in Java are the main ideas behind Java’s Object Oriented Programming. They are abstraction, encapsulation, inheritance, and polymorphism. Grasping them is key to understanding how Java works. Basically, Java OOP concepts let us create working methods and variables, then re-use all or part of them without compromising security.

HOPE THIS HELPED IS NOT SORRY.

Answer 2

OOP stands for Object Oriented Programming. In Java, we create classes to represent different things. For instance:

public class MyClass {

   public static void main(String args[]) {

     Car cr = new Car();

     cr.createCar("Ford", "Green", 2000);

     cr.printInfo();

   }

}

class Car{

   private String model, color;

   private int year;

   

   void createCar(String md, String cl, int yr){

       model = md;

       color = cl;

       year = yr;

   }

   void printInfo(){

       System.out.println("Car Info:");

       System.out.println("Model: "+model);

       System.out.println("Color: "+color);

       System.out.println("Year: "+year);

   }

}

We create a car object derived from the Car class with whatever properties we want and then we can display the properties of our car with the printInfo() method.

This is just one example of the OOP concept of Java.


Related Questions

A local bank has just one branch. It sets up a peer-to-peer network for all devices on the system. The bank would like to be able to have one technician administer the entire network from his location outside the bank without having to go to the bank each time there is a problem. Will this be possible for the technician?

A. It will not work because it is not possible to have the technician administer from one single location.

B. It will not work because the bank needs to use a server in a central location to allow for the remote access.

C. It will work as long as a LAN network is established to facilitate the communication between devices.

D. It will work if it uses a WAN to bring in all of the LANs to one central location.

CORRECT ANSWER IS B!

Answers

B
Good luck hope you get a good grade

It will not work because the bank needs to use a server in a central location to allow for the remote access, hence option B is correct.

What is a peer-to-peer network?

A distributed application architecture known as peer-to-peer computing or networking divides jobs or workloads across peers.

Peers are equally qualified and capable members of the network. They are referred to as the nodes in a peer-to-peer network.

In the hypothetical situation, the technician is unable to manage the complete network from outside the bank. Every time a problem arises, the technician must visit the bank.

Therefore, in order to give them the desired remote access, I need a server that is situated in a strategic location, hence option B is correct.

Learn more about peer-to-peer network, here:

https://brainly.com/question/10571780

#SPJ5

Question 1 of 20 Gus has decided to organize his inbox on June 26 by using folders and deleting irrelevant messages. He creates a folder called "Project XYZ" for all relevant emails related to this project. Which of the following emails should he save in this folder instead of deleting or moving it to another folder? O A. Schedule Update for Project XYZ B. Update: New Time and Location for May 20 Meeting for Project XYZ C. Time and Location for May 20 Meeting for Project XYZ D. New Project EFG to Launch Next Week SUB​

Answers

Answer: Schedule Update for Project XYZ

Explanation:

Answer:

A. Schedule Update for Project XYZ

write a program to Test if mold is stored in the variable word.

Answers

word = whatever value you want.

if "mold" in word:

   print("Mold is in the variable word.")

else:

   print("Mold is not in the variable word.")

What is the character missing in the line of code below that is part of the pseudocode outline of a program?
______ Get the user's height.

Answers

Answer:

# Get the user's height.

Explanation:

The answer is #

Answer: #

Explanation: got it right on edgen

d) Software which is basically language translation software.​

Answers

Answer:

tayanaf

Explan

ation:صثح


This the code from the last post I did

Answers

import java.util.Scanner;

public class JavaApplication86 {

   

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       int x = 0, c = 0, sum = 0;

       while (true){

           x = scan.nextInt();

           System.out.println("You entered: "+x);

           if (x == -1){

               break;

           }

           sum += x;

           c++;

       }

       System.out.println("The sum is "+sum);

       System.out.println("You entered "+c +" numbers");

   }

   

}

This works for me. Instead of subtracting one from c and adding one to sum, I used an if statement to break away from the while loop if the entered number is -1.


What is the device that is non-volatile sometime called external memory?

Answers

Answer:

bcause when the computer crashes and shuch the thing is fine becasue all it does is store

Explanation:

Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, and output all integers less than or equal to that value.

Answers

lst = input().split()

lst.pop(0)

w = lst[-1]

lst.pop(-1)

newlst = [int(x) for x in lst if int(x) <= int(w)]

print(newlst)

This works for me. Best of luck.

__init__(self, features, phones): create/initialize instance variables for features and the list of phones (optional) in the plan. When phones is not provided, use an empty list as its initial value. Create an instance variable

Answers

Answer:

class Phone(object):

   def __init__(self, features, phones=[]):

       self.features = features

       self.phones = phones

Explanation:

In python object-oriented programming, an instance variable of a class object is created in the "__init__()" method. the "self" is a convention name used to represent the instance of an object class. The input values are assigned to the object variable with the self.'argument_name' statement.

When the phone argument is not given, the self.phones variable is initialized as an empty list.  

For an indirect reference, what happens if there is no list of limited values authorized for a user in the direct reference?

a. SQL Injection
b. Brute Forcing of stored encrypted credentials
c. XML Injection
d. Access to sensitive data possible

Answers

Answer: Access to sensitive data possible

Explanation:

A reference is a value that allows a particular datum to be accessed indirectly by a program.

It should be noted that when there is no list of limited values authorized for a user in the direct reference, this will lead to a possibility for an access to sensitive data. Therefore, in order for this to be prevented, there should be a list of limited values that will be authorized for a user.

The absence of a list of limited values which would restrict access to certain files or data will lead to vulnerability of sensitive data. Hence, access to sensitive data possible.

The possibility of data being assessed by an unauthorized user is very likely when there is no restriction.

The reference is supposed to be key as a key to control the level of access given to users by providing a list of limited authorized values.

Hence, when these list is absent, then, access to sensitive data possible becomes very likely.

Learn more : https://brainly.com/question/16666220

Give the pseudocode of a data structure that supports the stack push and pop operations, and a third operation findMin, which returns the smallest element in the data structure, all in O(1) worst-case time.

Answers

Answer:

start Stack push:

IF stack is full

   return NULL

ENDIF

stack_top = stack_top + 1

stack[ stack_top] = data

end

start stack pop:

IF stack is empty

   return NULL

ENDIF

data = stack[ stack_top]

stack_top = stack_top - 1

end

start stack findMin:

SORT stack in ascending order

min = stack[0]

RETURN min

end

Explanation:

Pseudocode is the description of an algorithm to be used to implement a program code. The pseudocode above describes the step by step implementation of the stack data structure 'push', 'pop', and a new 'findMin' function. The findMin function sorts and gets the minimum value of the elements in the stack. The push and pop operators add and remove items from a stack.

The pseudocode of all three functions does not iterate over the stack element, but gets the constant values of an item in the stack, giving it a time complexity of 1 (O(1) in big-O notation).

Define a method pyramidVolume with double parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the volume of a pyramid with a rectangular base.

Answers

Answer:

double pyramidVolume(double baseLength, double baseWidth, double pyramidHeight)

{

  return baseLength * baseWidth * pyramidHeight / 3.0;

}

A man is charged a fee by the city for having numerous broken cars and auto parts in his front yard. Which of the following correctly describes why the city punishes him? He has committed a crime. He is in violation of a city statute. He has violated an amendment of the U.S. Constitution. A judge has decided that he is in violation of civil law.

Answers

Answer:

Violation of city Statute

         

Answer:

B

Explanation:

What game is this? help mee?

Answers

Answer:

nooooooo

Explanation:

A manufacturer of scented candles is preparing to produce five new candles with fragrances of peppermint, cinnamon, lemon, spice pumpkin, and pine scents to sell for the holiday season. To track the sale of the new scented candles you will need to create a program that should use two parallel element arrays. An array that will hold the names of the 5 new scented candles and another array that holds the count of the 5 new scented candles that are sold over the next couple of months. The program will track the fragrance type of the candle purchased and the number of candles sold for each fragrance. The program should also generate a report that displays the fragrance type of the 1.largest number and 2.smallest number of candles sold and the 3.total sales of all candles purchased.

Answers

Answer:

Why are you asking someone to create a program

Explanation:

Declare report candle fragrance_]{459.’~

Which two statements are true about an OS?

translates the user’s instructions into binary to get the desired output
-needs to be compulsorily installed manually after purchasing the hardware
-is responsible for memory and device management
-delegates the booting process to other devices
-is responsible for system security

Answers

The correct answers are A and C
Please give me brainless

Answer:

See answers below :)

Explanation:

-is responsible for memory and device management

-is responsible for system security

I need help with my previous question please

Answers

I can’t find your previous question :(

Write a C++ program that reads a temperature value and the letter C for Celsius or F for Fahrenheit. Print whether water is liquid, solid, or gaseous

Answers

Answer:

(1) #include<iostream>

(2) #include<conio.h>

(3) using namespace std;

(4) void main()

(5) {  

(6) float temp;

(7) char sel;

(8)    cout<<“Select a temperature value in Celcius or Fahrenheit.\n”;

(9)   cout<<“Press C for Celcius.\n”;

(10)   cout<<“Press F for Fahrenheit.\n”;

(11)  cin>>sel;

(12) switch (sel)

(13){

(14)case ‘C’:

(15) cout<<“Enter a temperature value in Celcius: “;

(16)cin>>temp;

(17) if(temp<=0)

(18)   {

(19)   cout<<“Water is solid at “<<temp<<” degree C.”;

(20)   }

(21)  else if(temp>=100)

(22)   {

(23)  cout<<“Water is gaseous at “<<temp<<” degree C.”;

(24) }

(25) else

(26)    {

(27)   cout<<“Water is liquid at “<<temp<<” degree C.”;

(28)  }

(29)         break;

(30)  case ‘F’:

(31)     cout<<“Enter a temperature value in Fahrenheit: “;

(32)   cin>>temp;

(33)   if(temp<=32)

(34)  {

(35)  cout<<“Water is solid at “<<temp<<” degree F.”;

(36)    }

(37)    else if(temp>=212)

(38)  {

(39)   cout<<“Water is gaseous at “<<temp<<“degree F.”;

(40)  }

(41)    else

(42)   {

(43)  cout<<“Water is liquid at “<<temp<<” F.”;

(44)    }        

(45)    break;

(46)  }  

(47)   getch();

(48) }

Users can customize their Windows device by going to the Control Panel under __________.

Answers

Answer:

The Settings app

Explanation:

The control panel on windows can be accessed by going into the settings app, or by going to the side bar and clicking the gear icon.

Answer:

hmmmm i would say system preferences but i may be incorrect

Explanation:

With _____, rather than automation, humans are in the decision loop, with machines rapidly executing the approved tasks.

Answers

Answer:

artificial intelligence

Explanation:

Remember, the term Artificial intelligence in simple words refers to a technology that enables machines (such as computers) to make decisions, plan activities, and execute tasks.

So in a sense, with widespread usage of artificial intelligence, humans would no longer play active roles in executing tasks but the machines will; doing so rapidly.


To identify a document as a template, you will need to change the file type in the_____ dialog box.

A. Options

B. Save As

C. References

D. Template

Answers

Answer:

A) options this is correct

Explanation:

Answer:

The answer is definitely option A

Explanation:

Which of the following is most often a barrier to software migration?
It's easier to continue using an out-of-date software program as long as possible.
O It's usually cheaper to upgrade software than it is to purchase a new product.
O It's difficult to find new software that is secure enough to replace the old software.
O It's not possible to keep old data when migrating to a new software program.

Answers

Answer: B: It's usually cheaper to upgrade software than it is to purchase a new product.

Explanation: I googled it lol :)

Answer:

b

Explanation:

b

A file named numbers.txt contains an unknown number of lines, each consisting of a single positive integer. Write some code that reads through the file and stores the largest number read in a variable named maxvalue.
** PYTHON**

Answers

f = open("numbers.txt", "r")

lst = [int(x) for x in f.read().splitlines()]

maxvalue = max(lst)

This works for me. Best of luck. If you want to test the code in an ide, use print(maxvalue) at the end of the code to see the value of your maxvalue variable.

Which statements are true about different software?

You can use a word processor to write, edit, print, and perform a variety of modifications on a document. Word processors work with entirely text-based documents without images or video. Spreadsheet programs enable users to perform statistical functions and create charts and graphs for data analysis. Managers can use database software to discuss financial performance with the help of slideshows. Graphics software, audio- and video-editing software, and media players are all examples of system software.

Answers

Answer:

You can use a word processor to write, edit, print, and perform a variety of modifications on a document.

Spreadsheet programs enable users to perform statistical functions and create charts and graphs for data analysis.

Explanation:

Took the test

Out-of-order instruction execution can cause problems because a later instruction may depend on the results from an earlier instruction. This situation is known as a ______ or a________

a. risk, reliance
b. hazard, reliance
c. risk, dependency
d. hazard, dependency

Answers

Answer:

C

Explanation:

Which of the following should be implemented when there is a period of high employee turnover?

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The question is about which of the following should be implemented when there is a period of high employee turnover?

The options to this question are given below.

A review of NTLM hashes on the domain servers A review of group policies A review of user access and rights A review of storage and retention policies

The correct option to this question is-3:

A review of user access and right.

Other options are not correct because these options are not related to review when employee turnover is going high etc.

Wake up to reality. Nothing ever goes as planned in this world. The longer you live,the more you realize that only pain, suffering and futility in this reality.

what show is this from correct answer gets brainly (i already know what show its from)​

Answers

Answer:

Naruto

Explanation:

Madara Uchiha said that TwT

-LavenderVye

(Print distinct numbers) Write a program that reads in numbers
separated by a space in one line and displays distinct numbers (i.e., if
a number appears multiple times, it is displayed only once). (Hint:
Read all the numbers and store them in list1. Create a new list list2.
Add a number in list1 to list2. If the number is already in the list,
ignore it.)

Answers

I've included my code in the picture below.

PLZZZZZZZZZZZZZZZ HELP ME OUT!!!!! I SICK AND TIRED OF PEOPLE SKIPING MY QUESTION WHICH IS DUE TODAY!!!!ANSWER THEM ALL PLZ

DIABETES: What causes this condition? *

DIABETES: What are the symptoms of this condition? *


DIABETES: Does this condition explain why Elisa may be tired? (Why or why not?) *

DIABETES: Which molecule is most likely affected by this condition: oxygen, glucose, or amino acids? *

ANEMIA: What causes this condition? *

ANEMIA: What are the symptoms of this condition? *

ANEMIA: Does this condition explain why Elisa may be tired? (Why or why not?) *


ANEMIA: Which molecule is most likely affected by this condition: oxygen, glucose, or amino acids? *

Answers

Answer:

Explanation:

Being overweight, eating unhealthy, and not exercising can cause diabetes.

Some symptoms of diabetes are being sleepy, being very thirsty, losing weight without trying to, being very hungry, having dry skin, and your hands or feet being numb are some symptoms.

This conditions does explain why Elsa may be tired because tiredness is a symptom of diabetes.

Glucose is most likely affected by diabetes.

Having a shortage of iron in your body causes anemia

Symptoms of anemia are weakness, fatigue, shortness of breath, pale skin, chest pain, and dizziness.

Anemia may be the reason Elisa is tired because it causes fatigue and weakness.

Oxygen is most likely affected by anemia.

Which of the following tools can be used to aggregate relational data from multiple sources?
A.)Power Pivot
B.)PivotTables
C.)Get & Transform

Answers

Answer:

ApOWER PIVOT

Explanation:

The tools that can be used to aggregate relational data from multiple sources is Power Pivot.

Data aggregation is the known as putting or gathering of data and presenting a summary form of it.

The data can be gathered from multiple data sources with the intent of combining these data sources into a summary for data analysis.

conclusively, Data warehouses gives users room to run queries, compile reports, generate analysis, and retrieve data in a consistent format.

Learn more from

https://brainly.com/question/21263038

Other Questions
what is the amino acid sequence of the DNA strand: TAC AAA GTT AGA GAG TAG ATC 6. Solve 2.6x + 2 > -12.5 and graph the solution on a number line. PLEASE HELP I HAVE AN EXAM TOMORROW Danielle is applying 25.2 N to the right on her sled. The sled has a mass of 15.7 kg, andis accelerating across the snow at a rate of 1.35 m/s2.What is the magnitude of the normal force?a. 4.00 Nb. 13.57 NC. 11.63 Nd. 153.86 N federalism increases public participation.justify the statement what was the nazi school system designed to? The diagram shows our solar system. name planet 4 what's 2014 ?[tex]20times 14[/tex]what is it? When making a decison you should always go with your gut Instinct?What makes the answer false? What does the map suggest about challenges faced by Austria-Hungary?If each ethnic group won independence, the empire would be forced to split apart.Nationalism was less of a problem for Austria-Hungary than it was for Germany.There were more ethnic Poles than any other group.Hungarians and Ukrainians were interested in forming an independent state. What expressions are equivalent to 4^-2 times 7^-2.choose two answersa. (4 times 7)^-4b. 1/28^2c. 7^-2/4^2d. (4 times 7)^4 Read this sentence from Anne Frank: A Diary of a Young Girl. I would like to ask God to give me a different nature, so that I didn't put everyone's back up. Which statement best interprets the meaning of the word nature? Its denotation is "changeable;" its connotation is "genetic." Its denotation is "personality;"; its connotation is "unavoidable." Its denotation is "genetic;" its connotation is "changeable." Its denotation is "unavoidable;" its connotation is "personality." Can you help me answer this How did Claires digestion reaction rates tell you that the problem was in her small intestine, and not her stomach? After the removal of troops from the South, whites disenfranchised African Americans, orO voted African Americans into political office.O prevented African Americans from joining parties.O took away African Americans' right to vote.O granted African Americans the right to ship of pirate becalmed near rocky coast-pirate sees bell fastened to dangerous submerged rock-asks what it is-is told it was placed there to warn sailors in storms-thinks it would be a joke to take the bell-rows across in boat to rock-they cut the chain and sink the bell-wind rises and they sail away-years after pirate returns to same coast-sea covered with fog and storm rising-pirate does not know where he is-a terrible crash-ship strikes on the same rock-as they go down the pirate realizes his ship wrecked on the same rock-wishes he had left the bell alone construct readable story What is the energy (in joules) and the wavelength (in meters) of the line in the spectrum of hydrogen that represents the movement of an electron from Bohr orbit with n = 3 to the orbit with n = 5? Oliver read for 450450450 minutes this month. His goal is to read for 10 percent more minutes next month.If Oliver meets his goal, how many minutes will he read in all during the two months? Please help me !!!!!!! Which cells come from bone marrow?