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
PilotLPTM [1.2K]
2 years ago
14

Create a class 'ProblemSolution' with following characteristics A public method 'solution' without parameters and return type is

int. Create object of class 'Student' inside 'solution' method and return the value of ""rollNumber"" from the class 'Student'.
Computers and Technology
1 answer:
Rus_ich [418]2 years ago
8 0

Answer:

The program to this question as follows:

Program:

class Student //defining class student

{

int rollNumber=1001; //defining integer variable rollnumber and assign value

int value() //defining method value

{

return rollNumber; //return value

}

}

public class ProblemSolution extends Student //defining class problemSolution that inherits Student

{

int solution() //defining method solution

{

Student stu=new Student(); //creating student class object

return stu.value(); //call function using return keyword  

}

public static void main(String ax[]) //defining main method

{

int result; //defining integer variable result

ProblemSolution ps=new ProblemSolution(); //creating class object

result=ps.solution(); //holding value of solution function

System.out.println("rollNumber value is: "+result); //print value

}

}

Output:

rollNumber value is: 1001

Explanation:

In the above java code two-class "Student and ProblemSolution" is defined, in which student class an integer variable rollNumber is defined, that holds a value "1001", and inside this class, a method "value" is defined, that return above variable value.

  • In the next step, class "ProblemSolution" is defined, that inherits the student class, inside this class two method "solution and the main method" is defined.
  • Inside the solution method, the student class object is created and this method uses the return keyword to call the student class method "value".
  • In the main method, an integer variable "result" is defined, which holds its method "solution" value and uses print function to print its value.
You might be interested in
The relationship between social media and the Internet is complex. Individual Internet behavior involves a myriad of factors tha
Artemon [7]

Answer:

Explanation:

The internet could be regarded has a marketplace or platform which gives individuals, businesses the opportunity to interact, relate, access opportunities, learn in an easy manner with the help of a data connection. The internet has redefined the process and concept of acesing information and interaction with the ease and coverage it brings. The Social media is could be seen a part of the internet platform which allows people to relate and interact, make friends, promote brands and so on. The internet and social media platforms however, in spite of its huge benefits comes with its inherent risk. Including the surge in cyber crime, immorality and information theft to mention a few. Common scenarios whereby banking details are being stolen from databases resulting in wholesale illegal transfer of funds. Issues of blackmail and violent defamation by groups of cohorts has also been a con in the advent of internet and social media, including growing trends of fake news which usually escalate tension, in which the recent unrest in my vicinity benefitted negatively from.

7 0
3 years ago
Using filtering as a strategy to deal with information overload requires Group of answer choices reviewing all unsolicited infor
STALIN [3.7K]

Answer:

The answer is "Choice B"

Explanation:

Please find the complete question in the attached file.

A filter is a tool for removing undesirable parts. Eliminate solid from a fluid, for example. The filter may mean the filter action: it could be used as a verb. When the filter is mentioned, various branches of science and technology often refer to a certain type of device. Filtering tries to decide the data you need and the data you have to address the overload.

4 0
2 years ago
What is inputted into a computer system?
Anna [14]

Answer:

Hey mate.....

Explanation:

This is ur answer.....

<em>Input refers to any information, or data, that is sent to a computer for processing. Input is often sent to the computer from a device such as a keyboard, mouse, or other input device. Putting it simple, input is the act of entering data into a computer.</em>

<em />

Hope it helps!

Mark me brainliest....

FOLLOW ME!!!! :)

4 0
2 years ago
Your employer's right to electronically monitor you is an issue of ____.
Cloud [144]

Answer: Employee privacy

Explanation:

 Employers can electronically monitor property, computer and electronic devices under the their rights in the organization but there is issue of employee privacy. As, employee has the right to privacy in the organization or workplace.

In some organization phones and email address are provided by the company so that they can electronically monitor the employee properly. In this case, some employee feel that monitoring is the violation of their personal  and privacy rights.

8 0
2 years ago
daniel wants to buy a computer to use for playing games after work. he loves racing games and wants to make sure his device has
kirza4 [7]

The factors which should be considered by Daniel are the RAM capacity and the Processor Core of the computer.

Computer games especially racing and football games are usually memory intensive and as such will require a good amount of RAM in other to ensure that the game runs smoothly as the RAM provides a temporary storage required for applications or programs to run smoothly.

Also, the processor core has to be put into consideration, Daniel will need a multi - core processor in other to aid the smooth running of his racing game.

Therefore, the factors that should be considered are the RAM and processor core.

Learn more :brainly.com/question/25010930

5 0
2 years ago
Other questions:
  • Yesterday Hunter's laptop screen appeared to go black. The laptop was still running, but he could not see the desktop or any gra
    9·1 answer
  • Tom's using Google Ads to promote his bicycle store. He's created an Android App and needs to measure how effectively the curren
    14·1 answer
  • A _____ is a member function that is automatically called when a class object is created.
    13·1 answer
  • The CSS property of top , bottom , left , or right moves the element the specified distance from the respective edge of the clos
    7·1 answer
  • A ______ is a computer that controls access to the hardware, software, and other resources on a network. mainframe server workst
    10·1 answer
  • The word __________ refers to the numbers, words, or more generally, any collection of symbols that is manipulated by a program.
    7·1 answer
  • Where are the results from the Advanced Find feature displayed?
    6·1 answer
  • Assume that the message M has to be transmitted. Given the generator function G for the CRC scheme, calculate CRC. What will be
    15·1 answer
  • You are testing the user experience.
    12·2 answers
  • KDS Company has 3 departments: 1. Dept X 2. Dept Y 3. Dept Z. Design a program that will read as input each department's sales f
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!