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
tatyana61 [14]
3 years ago
9

What are the design concepts and assumptions behind a class, an object and the relationship between them? What are the roles met

hods and static fields play in OOP?
Computers and Technology
1 answer:
Triss [41]3 years ago
8 0

Answer:

Object-oriented programming (OOP) is a procedural language and based on classes associated with an object. Without classes and object relationship OOP is not possible. According to program's design concept classes provide abstraction and encapsulation with the help of object. Object have states and behaviors like cat has states like name, color and  cat has also behaviors like  wagging the tail, eating, jumping etc. A class forms template or blueprints for these states and behaviors because different cats have different behaviors and states.

Methods provide a way for encapsulation and accessing private class members with public methods and static fields are sometimes best alternative for global variable. We can use static field when it same for all and shared by all objects of that class and it can save memory because we do not have to initialize it for each object

You might be interested in
Write a program that calculates and displays the number of minutes in a month. This program does not require any user input, and
dimulka [17.4K]

Answer:

Code to the answer is shown in the explanation section

Explanation:

import java.util.Scanner;

public class Question {

   public static void main(String args[]) {

     Scanner scan = new Scanner(System.in);

     System.out.println("Please enter the days of the month: ");

     int daysOfMonth = scan.nextInt();

     int minuteOfMonth = daysOfMonth * 60 * 24;

     System.out.println(minuteOfMonth);

   }

}

// 60 represents the number of minutes in one hour

// 24 represents the number of hours in a day

4 0
3 years ago
Who is the three president of somalia​
Snezhnost [94]

Answer:

Siad Barre

Explanation:

3 0
3 years ago
Read 2 more answers
Please help me!
BaLLatris [955]

Answer:

Choose what you think based on this.

Explanation:

with a for loop:

>>> students = 3

>>> for student in range(students):

>>> print(student)

would output

>>> 0

>>> 1

>>> 2

with a while loop now:

>>> students = 3

>>> student = 0

>>> while student < students:

>>> student = student + 1

>>> print(student)

the for loop is more compact than the while loop. But there may be some times when a you cant do a for loop. The first question is more than likely definite but I don't know the second answer.

8 0
3 years ago
Read 2 more answers
Digital information is stored using a series of ones and zeros. Computers are digital machines because they can only read inform
ryzh [129]
Is known as the binary system
8 0
3 years ago
Read 2 more answers
All of the following are computer hardware servicing tools EXCEPT​
andrey2020 [161]

Answer:

Shovel

Explanation:

7 0
3 years ago
Other questions:
  • Who is responsible for customer service?
    14·1 answer
  • What does a virus do to a computer? How can it be fixed?
    9·1 answer
  • The purpose of a software design is to enable programmers to implement the requirements by designating the projected parts of th
    14·1 answer
  • "which type of network connects smart devices or consumer electronics within a range of about 30 feet (10 meters) and without th
    7·1 answer
  • A user reports network resources can no longer be accessed. The PC reports a link but will only accept static IP addresses. The
    6·1 answer
  • Demonstrate the register addressing mode for the following instructions. Also what addressing mode belongs to these instructions
    11·1 answer
  • What are the different options in a page layout feature ? Select three options
    8·1 answer
  • You have a host device with an assigned IP address of 192.168.15.100 and a subnet mask of 255.255.255.192. To what network does
    13·1 answer
  • How do you make a minecraft server. just the basics please. I only need ine for me and my friends.
    7·2 answers
  • How do I add a Child to my Brainly account
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!