Can someone help me with this code please explain it to me in simple way
it's anstance variable in jave public class Record{

public String name;// this instance variable is visible for any child class.

private int age;// this instance age variable is visible in Record class only.

public Record (String RecName)
{
name = RecName;
}

public void setAge(int RecSal)
{
age = RecSal;
}

public void printRec()
{
System.out.println("name : " + name ); // print the value for “name”
System.out.println("age :" + age); //prints the value for “age”
}
public static void main(String args[])
{
Record r = new Record("Ram");
r.setAge(23);
r.printRec();
}
}
Output:

name : Ram
age :23

Answers

Answer 1

Answer:

It prints your name and age.

Explanation:

It prints the value for both name and age variables, so you need away to get it.


Related Questions

I am having trouble figuring out how to write a code to complete this assignment in Python:

Implement the build_dictionary() function to build a word frequency dictionary from a list of words.

Ex: If the words list is:

["hey", "hi", "Mark", "hi", "mark"]
the dictionary returned from calling build_dictionary(words) is:

{'hey': 1, 'hi': 2, 'Mark': 1, 'mark': 1}
Ex: If the words list is:

["zyBooks", "now", "zyBooks", "later", "zyBooks", "forever"]
the dictionary returned from calling build_dictionary(words) is:

{'zyBooks': 3, 'now': 1, 'later': 1, 'forever': 1}
The main code builds the word list from an input string, calls build_dictionary() to build the dictionary, and displays the dictionary sorted by key value.

Ex: If the input is:

hey hi Mark hi mark
the output is:

Mark: 1
hey: 1
hi: 2
mark: 1

This is what I have been given:

# The words parameter is a list of strings.
def build_dictionary(words):
# The frequencies dictionary will be built with your code below.
# Each key is a word string and the corresponding value is an integer
# indicating that word's frequency.

'''your code goes here'''

# The following code asks for input, splits the input into a word list,
# calls build_dictionary(), and displays the contents sorted by key.
if __name__ == '__main__':
words = input().split()
your_dictionary = build_dictionary(words)
sorted_keys = sorted(your_dictionary.keys())
for key in sorted_keys:
print(key + ': ' + str(your_dictionary[key]))

Answers

Answer:

def build_dictionary(words):

   dic = {}

   for word in words:

       dic [word] =words.count(word)

   return(dic)

if __name__ == '__main__':

   words = input().split()

   your_dictionary = build_dictionary(words)

   sorted_keys = sorted(your_dictionary.keys())

   for key in sorted_keys:

       print(key + ': ' + str(your_dictionary[key]))

Explanation:

use the count function cause the initial input is a list.

Following are the Python program code to count the list of word in the dictionary:

Python Program to count list of words:

def build_dictionary(words):#defining the method build_dictionary that takes words as a parameter

   f = {}#defining a variable dictionary as a f

   for i in words:#defining a loop that checks dictionary value

       if (i in f):#defining an if block that check dictionary value

           f[i] += 1#addining 1 in the value of list

       else:#defining else block

           f[i] = 1#holding 1 in the list

   return f#return list value

if __name__ == '__main__':

   words = input().split()#defining a variable words that input value and splits its value

   your_dictionary = build_dictionary(words)#defining a variable your_dictionary that adds value in build_dictionary

   sorted_keys = sorted(your_dictionary.keys())#defining variable sorted_keys that sort value your_dictionary as key

   for k in sorted_keys:#defining loop that counts number of value

       print(k + ': ' + str(your_dictionary[k]))#defining print method that prints its value

Output:

Please find the attached file.

Program Explanation:

Defining the method "build_dictionary" that takes one parameter "words" in the method. Inside this method, a dictionary variable named "f" is declared in which a for loop is declared. Inside this, a conditional block is declared that counts words' value.In the next step, a constructor is declared, in which words variable is declared that input value and splits its value.In the next step, "your_dictionary" is declared that that adds value to build_dictionary, and use stored method is used that sort its value and store its value in "sorted_keys".After that, a for loop is declared that counts the "sorted_keys" dictionary value and prints its counted list value.

Find out more information about the dictionary here:

brainly.com/question/1199071

I am having trouble figuring out how to write a code to complete this assignment in Python:Implement

To use an outline for writing a formal business document, what should you do
after entering your bottom-line statement?
O A. Move the bottom-line statement to the end of the document.
OB. Enter each major point from the outline on a separate line.
O C. Write a topic sentence for every detail.
OD. Enter each supporting detail from the outline on a separate line.

Answers

To use an outline for writing a formal business document after entering your bottom-line statement, you should: D. Enter each supporting detail from the outline on a separate line.

What is the outline?

To effectively structure the content of your business document and organize your ideas, it is beneficial to input each supporting detail outlined into individual lines. This method enables you to elaborate on every supporting aspect and furnish ample evidence to reinforce your primary assertion.

One way to enhance your document is by elaborating on each point with supporting details, supplying proof, illustrations, and interpretation as required.

Learn more about business document from

https://brainly.com/question/25534066

#SPJ1

Different types of users in a managed network, what they do, their classification based on tasks

Answers

In a  managed network,, skilled can be miscellaneous types of consumers accompanying various roles and blames.

What is the network?

Administrators are being the reason for directing and upholding the network infrastructure. Their tasks involve network arrangement, freedom management, consumer approach control, listening network performance, and mechanically alter issues.

Administrators have high-ranking approach and control over the network. Network Engineers: Network engineers devote effort to something designing, achieving, and claiming the network foundation.

Learn more about   network from

https://brainly.com/question/1326000

#SPJ1

How Charles Babbage Concept of
Computer has help the modern
Computer​

Answers

English mathematician and inventor Charles Babbage is credited with having conceived the first automatic digital computer. During the mid-1830s Babbage developed plans for the Analytical Engine. Although it was never completed, the Analytical Engine would have had most of the basic elements of the present-day computer.

PHI: How do you think Descartes would respond to your justification

Answers

Answer:

bc butt face

Explanation:

youur face

Suppose we are sorting an array of nine integers using heapsort, and we have just finished one of the reheapifications downward. The array now looks like this: 3 2 6 4 5 1 7 8 9 How many completed reheapification downward operations have been performed so far

Answers

Answer:

3

Explanation:

Heap sort pick an item from the first or last position in an array and compares it with other items in other positions in the array, swapping position if they meet the condition.

The array above has three maximum items arranged sequentially in the array, this is prove that there have been 3 reheapifications in the array.

someone help me

Write a C++ program that display a checkerboard pattern made of stars and blanks, as shown below. A checkerboard is eight squares by eight squares. This will be easier if you first declare two named string constants representing the two different row patterns. Be sure to include appropriate comment in your code, choose meaningful identifiers, and use indentation as do the programs.

someone help meWrite a C++ program that display a checkerboard pattern made of stars and blanks, as shown

Answers

The program is an illustration of loops.

Loops are used to perform repetitive and iterative operations.

The program in C++ where comments are used to explain each line is as follows:

#include <iostream>

using namespace std;

int main(){

   //This declares and initializes all variables

   string star = "*", blank = " ", temp;

   //The following iteration is repeated 8 times

   for (int i = 1; i <= 8; i++) {

       //The following iteration is repeated 8 times

       for (int j = 1; j <= 8; j++) {

           //This prints stars

           if (j % 2 != 0) {

               cout << star;

           }

           //This prints blanks

           else if (j % 2 == 0) {

               cout << blank;

           }

       }

       //This swaps the stars and the blanks

       temp = star;

       star = blank;

       blank = temp;

       //This prints a new line

       cout << endl;

   }

}

Read more about similar programs at:

https://brainly.com/question/16240864

Which tab can be used to change the theme and background style of a presentation?
O Design
O Home
O Insert
O View

Answers

Answer:

Design

Explanation:

seems the most correct one..

I would say design as well.

Two variables named largest and smallest are declared for you. Use these variables to store the largest and smallest of the three integer values. You must decide what other variables you will need and initialize them if appropriate. Your program should prompt the user to enter 3 integers. Write the rest of the program using assignment statements, if statements, or if else statements as appropriate. There are comments in the code that tell you where you should write your statements. The output statements are written for you. Execute the program by clicking the Run button at the bottom of the screen. Using the input of -50, 53, 78, your output should be: The largest value is 78 The smallest value is -50

Answers

Here's an example program in Python that stores the largest and smallest of three integer values entered by the user:

```python

# Declare variables for largest and smallest

largest = None

smallest = None

# Prompt user to enter three integers

num1 = int(input("Enter first integer: "))

num2 = int(input("Enter second integer: "))

num3 = int(input("Enter third integer: "))

# Determine largest number

if num1 >= num2 and num1 >= num3:

   largest = num1

elif num2 >= num1 and num2 >= num3:

   largest = num2

else:

   largest = num3

# Determine smallest number

if num1 <= num2 and num1 <= num3:

   smallest = num1

elif num2 <= num1 and num2 <= num3:

   smallest = num2

else:

   smallest = num3

# Output results

print("The largest value is", largest)

print("The smallest value is", smallest)

```

In this program, the variables `largest` and `smallest` are declared and initialized to `None`. Three additional variables `num1`, `num2`, and `num3` are declared and initialized with integer values entered by the user using the `input()` function and converted to integers using the `int()` function.

The program then uses a series of `if` and `elif` statements to determine the largest and smallest of the three numbers, based on their values. The `largest` and `smallest` variables are updated accordingly.

Finally, the program outputs the results using two `print()` statements.v

to control specific offers for goods or services and thus the resulting contracts, important terms to provide online include

Answers

Important conditions to present online include a clause referring to the management of any dispute to regulate certain offers for products or services and therefore the following contracts.

What is it known as online?

When a device is on and linked to other things, such as a computer, a network, or a device like a printer, it is said to be online. Online now refers to being hosted in more recent times.

What do you mean by an online course?

An online course is one that is delivered over the Internet. Courses are often performed using a lms, where students may access their course curriculum, track their academic progress, and interact with their peers and instructors.

To know more about Online visit:

https://brainly.com/question/1395133

#SPJ1

The complete question is-

To control specific offers for goods or services and thus the resulting contracts, important terms to provide online include

a). a detailed history of the particular business.

b). an updated list of the goods or services.

c). a provision relating to the resolution of any dispute.

d). positive reviews from customers or clients.

What happens when two users attempt to edit a shared presentation in the cloud simultaneously? The second user is unable to open the presentation. When the second user logs on, the first user is locked out. A presentation cannot be shared in the cloud for this reason. A warning notice will alert the users that the presentation is in use.

Answers

Answer:

a warning notice will alert the users that the presentation is in use

Explanation:

I did it on edge

Answer:

D; A warning notice will alert the users that the presentation is in use.

Explanation:

Edge

Each of the following is a component of the telecommunications industry except _____.


spreadsheets

wired communications

broadcasting

HDTV

Answers

Hmmmmmmm I think it’s A.

Give one advantage of using different types of files as data sources mail merge

Answers

Answer:

The Mail Merge feature makes it easy to send the same letter to a large number of people.

How do you install operating systems on a computer

Answers

install the operating system on the computer using a CD or DVD, you need to configure your computer to boot from the CD/DVD drive. You can change the boot sequence in your BIOS setup, and setting the CD/DVD drive to be the first boot device.

What is this screen called? (I attached a picture)
A. Graph Screen
B. Y Editor Screen
C. Table Screen
D. Window Screen

What is this screen called? (I attached a picture)A. Graph ScreenB. Y Editor ScreenC. Table ScreenD.

Answers

Answer:

i believe it's a y editor screen

The answer is graph screen (:

What is the purpose of the Subtotal feature?

summarizes data for analysis
copies the headings to the Clipboard
performs calculations
groups data by levels

Answers

Answer:

performs calculations

Explanation:

The SUBTOTAL function in Excel allows users to create groups and then perform various other Excel functions such as SUM, COUNT, AVERAGE, PRODUCT, MAX, etc. Thus, the SUBTOTAL function in Excel helps in analyzing the data provided.

Answer:

Summarizes Data For Analysis,

Explanation:

Answer is A, just did it

Provide a code example for a shape with no outline. What can you do to ensure this is the
outline that will be used?

Answers

A code example for a shape with no outline or one that its borders has been removed has been given below:

The Code

Dim rngShape As InlineShape

For Each rngShape In ActiveDocument.InlineShapes

   With rngShape.Range.Borders

       .OutsideLineStyle = wdLineStyleSingle

       .OutsideColorIndex = wdPink

      .OutsideLineWidth = wdLineWidth300pt

   End With

Next rngShape

Read more about shapes and borders here:

https://brainly.com/question/14400252

#SPJ1

2.10 LAB - Select employees and managers with inner join
The Employee table has the following columns:
• ID-integer, primary key
.
FirstName-variable-length string
• LastName-variable-length string
ManagerID - integer
.
Write a SELECT statement to show a list of all employees' first names and their managers' first names. List only employees that have a
manager. Order the results by Employee first name. Use aliases to give the result columns distinctly different names, like "Employee and
"Manager".
Hint: Join the Employee table to itself using INNER JOIN.

I have the code, however I have the employees as managers and the managers as the employees in the table. Here is the code I have.

SELECT emp.FirstName AS Employee, mgr.FirstName as Manager FROM Employee AS emp

INNER JOIN Employee AS mgr

ON emp.ID = mgr.ManagerID

ORDER BY mgr.ManagerID; no

2.10 LAB - Select employees and managers with inner joinThe Employee table has the following columns:

Answers

The statement to show a list of all employees' first names and their managers' first names is in explanation part.

What is SQL?

SQL is an abbreviation for Structured Query Language. SQL allows you to connect to and manipulate databases. SQL was adopted as an American National Standards Institute (ANSI) standard in 1986.

Here's an example SQL query to show a list of all employees' first names and their managers' first names, ordered by employee first name:

SELECT e1.FirstName AS Employee, e2.FirstName AS Manager

FROM Employee e1

INNER JOIN Employee e2

ON e1.ManagerID = e2.ID

ORDER BY Employee;

Thus, in this we order the results by the Employee column (i.e., the first name of the employee). The query only returns employees that have a manager (i.e., their ManagerID column is not null).

For more details regarding SQL, visit:

https://brainly.com/question/13068613

#SPJ9

what type of collection is used in the assignment statement
info: [3:10,4:23,7:10,11:31]

tuple
list
Duque
dictionary ​

Answers

Answer:

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

Explanation:

There are four data types in Python used to store data such as tuple, list, set, and dictionary.

The correct answer to this question is option D: Dictionary

Dictionary data type is used to store data values in key:value pairs as given in the question. It is a collection that is changeable, unordered, and does not allow duplicate entries.

Dictionaries in Python are written with curly brackets and have keys and values such as car={name="honda", model=2010}

when you run the given assignment statment such

info= {3:10,4:23,7:10,11:31}

print(info)

It will print the info dictionary (key:value pair)

{3: 10, 4: 23, 7: 10, 11: 31}

While other options are not correct because:

Tuples in Python are used to store multiple items in a single variable. For example:

info=("apple", "banana", "cherry")

List is used to store multiple items in a single variable. for example

myList = ["apple", "banana", "cherry"]

print(myList)

The list is ordered, changeable, and allows duplicate entry. But you can not put key: value pair in the list.

Deque is a double-ended queue that has the feature to add or remove an element on it either side.

Answer:

Dictionary is the answer

Which of the following occupations is least likely to involve use of a computing device on a day-to-day basis?

Janitorial duties
Cashier in a bank
Journalist
Records clerk in a hospital

Answers

Answer:

Janitorial duties

Explanation:

24/3*2^2/2*3+(20-10)-40

Answers

Answer:

34

Explanation:

You use pemdas

The epa requires spray guns used in the automotive refinishing process to have transfer efficiency of at least

Answers

The epa requires spray guns used in the automotive refinishing process to have transfer efficiency of at least  65 percent transfer efficiency.

What is the transfer efficiency

EPA lacks transfer efficiency requirement for auto refinishing spray guns. The EPA regulates auto refinishing emissions and impact with rules. NESHAP regulates paint stripping and coating operations for air pollutants.

This rule limits VOCs and HAPs emissions in automotive refinishing. When it comes to reducing overspray and minimizing wasted paint or coating material, transfer efficiency is crucial. "More efficiency, less waste with higher transfer rate."

Learn more about transfer efficiency  from

https://brainly.com/question/29355652

#SPJ1

relationship between goal of psychology and types of research method using examples

Answers

Explanation:

Describe-The first goal is to observe behaviour and describe often in minute detail what was observed as objectively as possible

Explain-

Predict-

control-

Improve-

Can computers be opened from the All programs submenu

Answers

Answer:

I am pretty sure...if not try duck duck go

can u please answer this​

can u please answer this

Answers

Answer to your question is given in the attachment

PLEASE MARK ME AS BRAINLIEST

I don't know the answer of 2 and 3

Sorry for that :(

can u please answer this

Many documents use a specific format for a person's name. Write a program that reads a person's name in the following format:

firstName middleName lastName (in one line)

and outputs the person's name in the following format:

lastName, firstInitial.middleInitial.

Ex: If the input is:

Pat Silly Doe
the output is:

Doe, P.S.
If the input has the following format:

firstName lastName (in one line)

the output is:

lastName, firstInitial.

Ex: If the input is:

Julia Clark
the output is:

Clark, J.

Answers

Using the knowledge in computational language in JAVA it is possible to write the code that write a program whose input is: firstName middleName lastName, and whose output is: lastName, firstName middleInitial.

Writting the code:

import java.util.Scanner;

import java.lang.*;

public class LabProgram{

public static void main(String[] args) {

String name;

String lastName="";

String firstName="";

char firstInitial=' ',middleInitial=' ';

int counter = 0;

Scanner input = new Scanner(System.in);

name = input.nextLine(); //read full name with spaces

int i;

for(i = name.length()-1;i>=0;i--){

if(name.charAt(i)==' '){

lastName = name.substring(i+1,name.length()); // find last name

break;

}

}

for(i = 0;i<name.length()-1;i++){

if(name.charAt(i)==' '){

firstName = name.substring(0, i); // find firstName

break;

}

}

for(i = 0 ;i<name.length();i++){

if(name.charAt(i)==' '){

counter++; //count entered names(first,middle,last or first last only)

}

}

if(counter == 2){

for(i = 0 ;i<name.length();i++){

if(Character.toUpperCase(name.charAt(i)) == ' '){

middleInitial = Character.toUpperCase(name.charAt(i+1));//find the middle name initial character

break;

}

}

}

firstInitial = Character.toUpperCase(name.charAt(0)); //the first name initial character

if(counter == 2){

System.out.print(lastName+", "+firstName+" "+middleInitial+".");

}else{

System.out.print(lastName+", "+firstName);

}

}

}

See more about JAVA at brainly.com/question/12975450

#SPJ1

Many documents use a specific format for a person's name. Write a program that reads a person's name

Suppose we have relation R(A, B, C, D, E), with some set of FD’s, and we wish to project those FD’s onto relation S(A, B, C). Give the FD’s that hold in S if the FD’s for R are:
a) AB → DE, C → E, D → C, and E →A.
b) A → D, BD → E, AC → E, and DE → B.
c) AB → D, AC → E, BC → D, D → A, and E → B.
d) A → B, B → C, C → D, D → E, and E → A.
In each case, it is sufficient to give a minimal basis for the full set of FD’s of S

Answers

The minimal basis for S is therefore AB → A, AB → B, C → E, and D → C.

How to explain the minimal basis

The minimal basis for S is therefore A → D, A → E, and C → E.

The minimal basis for S is therefore AB → A, AB → B, AC → C, BC → B, and C → E.

The minimal basis for S is therefore A → B, B → C, and C → A. Note that the FDs D → E and E → A are not needed, as they are implied by A → B, B → C, and C → A.

Learn more about minimal on

https://brainly.com/question/29481034

#SPJ1

Data ____ refers to the accuracy of the data in a database

Answers

Accuracy or quality?

What happens after the POST?

Answers

After the POST, the computer is ready for user interaction. Users can launch applications, access files, browse the internet, and perform various tasks depending on the capabilities of the operating system and the installed software.

After the POST (Power-On Self-Test) is completed during a computer's startup process, several important events take place to initialize the system and prepare it for operation. Here are some key steps that occur after the POST:

1. Bootloader Execution: The computer's BIOS (Basic Input/Output System) hands over control to the bootloader. The bootloader's primary task is to locate the operating system's kernel and initiate its loading.

2. Operating System Initialization: Once the bootloader locates the kernel, it loads it into memory. The kernel is the core component of the operating system and is responsible for managing hardware resources and providing essential services.

The kernel initializes drivers, sets up memory management, and starts essential system processes.

3. Device Detection and Configuration: The operating system identifies connected hardware devices, such as hard drives, graphics cards, and peripherals.

It loads the necessary device drivers to enable communication and proper functioning of these devices.

4. User Login: If the system is set up for user authentication, the operating system prompts the user to log in. This step ensures that only authorized individuals can access the system.

5. Graphical User Interface (GUI) Initialization: The operating system launches the GUI environment if one is available. This includes loading the necessary components for desktop icons, taskbars, and other graphical elements.

6. Background Processes and Services: The operating system starts various background processes and services that are essential for system stability and functionality.

These processes handle tasks such as network connectivity, system updates, and security.

For more such questions on POST,click on

https://brainly.com/question/30505572

#SPJ8

What web frameworks is the best

Answers

Based on my own experience, the web frameworks that is known to be the best are:

Express.Django.Rails.Laravel.

What is meant by a web framework?

A web development framework is known to be a composition or a group of resources as well as tools that are known to be used by software developers to be able to build as well as manage web applications, web services and also the creation of websites.

Therefore, based on their quality, one can say that the above mention are the best.

Hence, Based on my own experience, the web frameworks that is known to be the best are:

Express.Django.Rails.Laravel.

Learn more about web frameworks from

https://brainly.com/question/16792873

#SPJ1

Other Questions
in linear algebra, when does a solution exist? how can you connect this to solutions of constant-coefficient, linear, ivp's? Which component that makes up the bulk of all galaxies?A. gasB. dark matterC. dustD. stars My art teacher is painting a picture in the shape of a square that has an area of 225 square inches. What is the perimeter? The stage of group development in which the group develops open communication and group cohesion is the ____ stage. what is this song it goes like this what you know about rolling down in the deep f(x) = 3/x+2-x-3The domain for f(x) is all real numbers ___ than it equal to 3 to revise for effective sentence skillswhich of these techniques might be most helpful I opened the door quietly ............. my father according to the s.a.v.e. framework, customers are drawn to ______. 1. Mi padre _____c______________ el csped los sbados. (cortar)2. Yo _____________________ la luz en el saln de clase. (apagar)3. Los estudiantes _____________________ los libros. (cuidar)4. T nunca ______________________ huevos. (desayunar)5. Vosotros _________________________ mucho.(hablar)6. Quin ____________________ los platos en tu casa? (lavar) What is the name of the atom in a ligand that is bound directly to the metal atom? donor atom chelating atom coordinator acceptor atom chelating agent This is a grammar question. Plz need a correct answer Give the mathematical statements for the following verbal statements, where d,y,z,p,q,r are variables, g,h are constants and k is a positive constant. (a) The rate of change of the rate of change r at any time t where r is the dependent variable and t is an independent variable. (2 Points) (b) The difference between the sum of a variable d and 5 and the square of p is inversely proportional to the square of the sum of q and 2 . (2 Points) (c) The difference between 5 times g and 9 is inversely proportional to the sum of the n-th power of h and 4. (2 Points) (d) fifteen times p is inversely proportional to the n2-th power of r. (2 Points) (e) y is directly proportional to the square of the difference between z and 4 and inversely proportional to the square root of the square of q. (2Points) helo please find the values of x and y FILL IN THE BLANK the energy from sunlight is absorbed by ________ inside photosynthetic organelles. select all that apply. Ariel collected information about mockingbirds for a science project.Times (s) 30 90 150Number of Wing beats 420 1,260 2,100How many times will a mockingbird beat its wings in 2 minutes? Enter the number in the box. In triangle ABC, ACB = 67, AB= 6.9 cm andBC = 5.7 cm.a Calculate angle BC.b Hence find the area of AABC.Please answer all questions to 3 correct sig figs. A rectangular room is 12 1/2 feet long and 10 1/3 feet wide. What is the area of the room?Answers to choose from:A 22 5/6 square feetB 120 1/6 square feetC 120 1/3 square feetD 129 1/6 square feet 7th gradeFour different relationships are modeled in the tables. Select the table that models a proportional relationship. Multiple choice math. Make sure you are correct tho!