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
marusya05 [52]
3 years ago
7

Consider the following class definition.

Computers and Technology
1 answer:
erik [133]3 years ago
3 0

Answer:

public int getX()

Explanation:

From the question, we understand that the value is to be accessed in other classes.

This implies that we make use of the public access modifier. Using the public modifier will let the instance variable be accessed from other classes.

Also, we understand the return type must be the variable type of x. x is defined as integer. So, the constructor becomes public x

Lastly, we include the constructor name; i.e. getX().

Hence, the constructor is: <em>public int getX()</em>

You might be interested in
match the parts of a project plan listed in Column A to the specific examples given in Column B.Write the letter of your answer
prisoha [69]

Answer:

  1. The name of the project is    C: Reversible Playmat
  2. The objectives are given in B
  3. The Sketch is given as D
  4. The Materials needed is listed in A
  5. The procedure is F
  6. Evaluation is E

Explanation:

You would find that the other matches are relatively easy save for B and F. The difference between the procedure is that the procedure is more detailed about what needs to be done.

Notice that F states exactly, the dimensions that need to be cut while B albeit wordier, gives a description of the end result only.

Cheers.

7 0
3 years ago
Implement a C program to solve the 15-puzzle problem using the A* search algorithm.
fomenos

Answer:

#include<stdio.h>

#include<conio.h>

int m=0,n=4;

int cal(int temp[10][10],int t[10][10])

{

               int i,j,m=0;

               for(i=0;i < n;i++)

                               for(j=0;j < n;j++)

                               {

                                               if(temp[i][j]!=t[i][j])

                                               m++;

                               }

               return m;

}

int check(int a[10][10],int t[10][10])

{

               int i,j,f=1;

               for(i=0;i < n;i++)

                               for(j=0;j < n;j++)

                                               if(a[i][j]!=t[i][j])

                                                               f=0;

               return f;

}

void main()

{

               int p,i,j,n=4,a[10][10],t[10][10],temp[10][10],r[10][10];

               int m=0,x=0,y=0,d=1000,dmin=0,l=0;

               clrscr();

               printf("\nEnter the matrix to be solved,space with zero :\n");

               for(i=0;i < n;i++)

                               for(j=0;j < n;j++)

                                               scanf("%d",&a[i][j]);

               printf("\nEnter the target matrix,space with zero :\n");

               for(i=0;i < n;i++)

                               for(j=0;j < n;j++)

                                               scanf("%d",&t[i][j]);

               printf("\nEntered Matrix is :\n");

               for(i=0;i < n;i++)

               {

                               for(j=0;j < n;j++)

                                               printf("%d\t",a[i][j]);

                               printf("\n");

               }

               printf("\nTarget Matrix is :\n");

               for(i=0;i < n;i++)

               {

                               for(j=0;j < n;j++)

                                               printf("%d\t",t[i][j]);

                               printf("\n");

               }

               while(!(check(a,t)))

               {

                               l++;

                               d=1000;

                               for(i=0;i < n;i++)

                                               for(j=0;j < n;j++)

                                               {

                                                               if(a[i][j]==0)

                                                               {

                                                                               x=i;

                                                                               y=j;

                                                               }

                                               }

                               //To move upwards

                               for(i=0;i < n;i++)

                                               for(j=0;j < n;j++)

                                                               temp[i][j]=a[i][j];

                               if(x!=0)

                               {

                                               p=temp[x][y];

                                               temp[x][y]=temp[x-1][y];

                                               temp[x-1][y]=p;

                               }

                               m=cal(temp,t);

                               dmin=l+m;

                               if(dmin < d)

                               {

                                               d=dmin;

                                               for(i=0;i < n;i++)

                                                               for(j=0;j < n;j++)

                                                                               r[i][j]=temp[i][j];

                               }

                               //To move downwards

                               for(i=0;i < n;i++)

                                               for(j=0;j < n;j++)

                                                               temp[i][j]=a[i][j];

                               if(x!=n-1)

                               {

                                               p=temp[x][y];

                                               temp[x][y]=temp[x+1][y];

                                               temp[x+1][y]=p;

                               }

                               m=cal(temp,t);

                               dmin=l+m;

                               if(dmin < d)

                               {

                                               d=dmin;

                                               for(i=0;i < n;i++)

                                                               for(j=0;j < n;j++)

                                                                               r[i][j]=temp[i][j];

                               }

                               //To move right side

                               for(i=0;i < n;i++)

                                               for(j=0;j < n;j++)

                                                               temp[i][j]=a[i][j];

                               if(y!=n-1)

                               {

                                               p=temp[x][y];

                                               temp[x][y]=temp[x][y+1];

                                               temp[x][y+1]=p;

                               }

                               m=cal(temp,t);

                               dmin=l+m;

                               if(dmin < d)

                               {

                                               d=dmin;

                                               for(i=0;i < n;i++)

                                                               for(j=0;j < n;j++)

                                                                               r[i][j]=temp[i][j];

                               }

                               //To move left

                               for(i=0;i < n;i++)

                                               for(j=0;j < n;j++)

                                                               temp[i][j]=a[i][j];

                               if(y!=0)

                               {

                                               p=temp[x][y];

                                               temp[x][y]=temp[x][y-1];

                                               temp[x][y-1]=p;

                               }

                               m=cal(temp,t);

                               dmin=l+m;

                               if(dmin < d)

                               {

                                               d=dmin;

                                               for(i=0;i < n;i++)

                                                               for(j=0;j < n;j++)

                                                                               r[i][j]=temp[i][j];

                               }

                               printf("\nCalculated Intermediate Matrix Value :\n");

                               for(i=0;i < n;i++)

                               {

                                               for(j=0;j < n;j++)

                                               printf("%d\t",r[i][j]);

                                               printf("\n");

                               }

                               for(i=0;i < n;i++)

                                               for(j=0;j < n;j++)

                                               {

                                               a[i][j]=r[i][j];

                                               temp[i][j]=0;

                                               }

                               printf("Minimum cost : %d\n",d);

               }

               getch();

}

Explanation:

7 0
3 years ago
Which professional can film projects hire as part of their budgeted costs? You can hire special ____ lawyers and include their f
gregori [183]
This is clearly A it is not that hard
3 0
3 years ago
What is meaning of geo and bio​
Aleks [24]

Answer:

GEO. genetically enhanced organism. Medical, Health, Healthcare.

The word biology is derived from the greek words /bios/ meaning /life/ and /logos/ meaning /study/ and is defined as the science of life and living organisms. An organism is a living entity consisting of one cell e.g. bacteria, or several cells e.g. animals, plants and fungi.

Hope it helps

Explanation:

5 0
3 years ago
Read 2 more answers
Provide an example of a question that could NOT be answered with a binary message. Explain why this is the case, making referenc
solong [7]
This is a question with a much simpler answer given its open ended ness - a representation merely means, given binary data, we can determine what 'thing' that binary data corresponds to.

<span>That makes the question unanswerable, because words can all be represented in binary data, and the question cannot be answered without those. Thus, all answers we can convey have a binary representation of some form (that form being the translation of the words we used to communicate the answer into binary data).</span>
7 0
4 years ago
Other questions:
  • 61. Select an activity of the Production Phase: a. a web authoring tool is often used b. the graphics, web pages, and other comp
    10·1 answer
  • Because public key encryption requires the use of two different keys, it is also known as _____ encryption
    13·1 answer
  • You would like to set up on online meeting to communicate with colleagues on a group project. Which of these tools should you su
    5·2 answers
  • The tools that cyber criminals often use, including computer viruses, worms, trojan horses and spyware, are called __________. q
    5·1 answer
  • Which is the most effective manner to deliver a speech inmost business settings?extemporaneous presentationmemorizationreadingvi
    9·1 answer
  • Write a python program that asks the user to enter a student's name and 8 numeric tests scores (out of 100 for each test). The n
    5·1 answer
  • I Promise Brainliest !!!!! Describe how the aperture size relates to the size of the lens opening.
    15·2 answers
  • These statements describe a network server.
    5·1 answer
  • A computer projecter is an example of a(n):<br> Input Device<br> Output Device<br> Storage Device
    12·2 answers
  • What device senses short circuits and stops electrical flow when ground faults occur?.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!