Question

Please help me get the answer to the question. If possible could you please explain briefly?...

Please help me get the answer to the question. If possible could you please explain briefly? Thank you in advance.

Show the answers in the string format for a space ie if the answer is a space object with row 45 and column 57 then the answer would be "r45c57".

1) Assume the width is 100 and the height is 100, "calling convertXYToSpace(25, 25)"

what would return?

2) Assume the width is 100 and the height is 100, "calling convertXYToSpace(175, 225)"

what would return?

3)Assume the width is 50 and the height is 150, "calling convertXYToSpace(225, 225)"

what would return?

4) Assume the width is 150 and the height is 50, "calling convertXYToSpace(125, 225)"

what would return?

5)

Assume the width is 50 and the height is 150, "calling convertXYToSpace(125, 225)"

what would return?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution:

I am writing a java code for your question. Please do comment in case of any query.

//Code

public class Main

{

//main method

public static void main(String[] args)

{

//print output

System.out.println(convertXYToSpace(25, 25));

System.out.println(convertXYToSpace(175, 225));

System.out.println(convertXYToSpace(225, 225));

System.out.println(convertXYToSpace(125, 225));

System.out.println(convertXYToSpace(125, 225));

}

//method to convert the output in string format

public static String convertXYToSpace(int a,int b)

{

//StringBuilder class to make object to append

StringBuilder output = new StringBuilder();

//appending as per requirement

output.append("r").append(a).append("c").append(b);

//returning the output string

return output.toString();

}

}

Output:

Online Java compiler, Online Java IDE, and online. Code Java, compile Java, run Java, and host your programs and apps onlin..

Please give thumbsup, if you like it. Thanks.

Add a comment
Know the answer?
Add Answer to:
Please help me get the answer to the question. If possible could you please explain briefly?...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please graph and label as instructed(make it clear please) Provide answer and explain. Thank you The...

    Please graph and label as instructed(make it clear please) Provide answer and explain. Thank you The graph shows the demand curve and marginal revenue curve of Whitewater, Inc., a producer of canoes in monopolistic competition Draw the firm's marginal cost curve if Whitewater produces 125 canoes a week. Label it. Draw a point at the profit-maximizing quantity and price Price and cost (dollars per canoe) 540- 480 420 360 If average total cost at the profit-maximizing quantity is $300 a...

  • Question 6 Select one answer. Based on the results of a nation-wide study, the number of...

    Question 6 Select one answer. Based on the results of a nation-wide study, the number of contacts programmed into cell phones are summarized on the following boxplot: 10 points 1 25 50 75 100 125 150 175 200 225 Which of the following is true about this data? A. ︵ The lowest observation is an outlier. B. O The highest observation is an outlier. C. The data is skewed left. D. O The data is skewed right. E. O There...

  • Here is my code for minesweeper in python and it has something wrong. Could you please help me to fix it? import tkinter as tk import random class Minesweeper: def __init__(self): self.main = tk.Tk()...

    Here is my code for minesweeper in python and it has something wrong. Could you please help me to fix it? import tkinter as tk import random class Minesweeper: def __init__(self): self.main = tk.Tk() self.main.title("mine sweeper") self.define_widgets() self.mines = random.sample( [(i,j) for i in range(25) for j in range(50) ],self.CustomizeNumberOfMines()) print(self.mines) self.main.mainloop() self.CustomizeNumberOfMines() def define_widgets(self): """ Define a canvas object, populate it with squares and possible texts """ self.canvas = tk.Canvas(self.main, width = 1002, height=502, bg="#f0f0f0") self.canvas.grid(row=0, column=0) self.boxes =...

  • Please explain this GDP problem? Why do you/don't you include the things you include? Answer is...

    Please explain this GDP problem? Why do you/don't you include the things you include? Answer is C ($575). 30. Table-8: Calculate the GDP of the country described in the table. Note that there are no income or expenditures other than those described in the table A $825 B $650 Interest Income Wages Business Profits Rental Income Household Investment Household Consumption Government Investment Other Government Expenditures and Transfers Imports Exports $100 $250 $125 $100 $175 $300 $125 $150 $75 $50 Table-8...

  • Based on the tons handled in a year, the ports listed below are the 25 busiest...

    Based on the tons handled in a year, the ports listed below are the 25 busiest ports in the United States (The 2013 World Almanac). Click on the webfile logo to reference the data were WEB file Tons Handled Millions) Tons Handled Millions) Port Norfolk Harbor Baton Rouge 770 34.0 Corpus Christi Duluth-Superior Huntington 558 30.2 34.7 2363 Plaquemines Port Arthur 227.1 615 54.6 15.4 62.4 Lake Charles South Louisiana St. Louis 4 34.2 Los Angeles New Orleans New York...

  • PLEASE READ VERY CAREFULLY!! SHOW ALL THE CALCULATIONS! AND LIST ALL THE TOTAL REVENUE COORDINATE POINTS!!...

    PLEASE READ VERY CAREFULLY!! SHOW ALL THE CALCULATIONS! AND LIST ALL THE TOTAL REVENUE COORDINATE POINTS!! ANSWER OPTIONS FOR NUMBER 1: 0, 0.6, 1.67, 75.02 2. ELASTIC, UNIT ELASTIC, INELASTIC 3. A DECREASE, AN INCREASE, NO CHANGE 4. ELASTIC, UNIT ELASTIC, INELASTIC Use the green rectangle (triangle symbols) to compute total revenue at various prices along the demand curve. Note: You will not be graded on any changes made to this graph. 300 275 250 Total Revenue 225 200 2...

  • Please help me with this question. I would really appreciate it. Please explain briefly I am...

    Please help me with this question. I would really appreciate it. Please explain briefly I am trying to prepare for a test. Consider the following relational database to manage concert and ticket sales. The relations are artist, concert, venue, seat, ticket, and fan. The schemas for these relations (with primary key attributes underlined) are: Artist-schema = (artistname, type, salary) Concert-schema = (artistname, date, venuename, artistfees) Venue-schema = (venuename, address, seating_capacity) Seat-schema=(venuename, row, seatnumber) Ticket-schema = (fanID, date, venuename, row, seatnumber)...

  • This is a revision of a previous exercise, here is the question: Perform exercise 4 at...

    This is a revision of a previous exercise, here is the question: Perform exercise 4 at the end chapter 8 of your textbook using dynamic arrays. (This time the program must use dynamic arrays). I have regular array version posted below. C++: Write a program that reads a file consisting of students’ test scores in the range 0-200. It should then determine the number of students having scores in each of the following ranges: 0-24, 25-49, 50-74, 75-99, 100-124, 125-149,...

  • Could you please help me with an answer to this question in a simple way for...

    Could you please help me with an answer to this question in a simple way for the beginner? This is a beginner level class so can you please help me. The code must have beginner level implementation. Can you also please explain what things do. Thank you! Write a program that prompts the user for a positive integer number smaller than 256 (i.e. in [0...255]) and converts it into an 8-bit binary number. The bits are the remainders of the...

  • pls help me with it. you just need to answer the question in Appointment.Java, There is...

    pls help me with it. you just need to answer the question in Appointment.Java, There is only 1 question u need to answer! Appointment.Java package option1.stage3; import option1.stage1.Doctor; import option1.stage1.Patient; import option1.stage2.TimeSlot; public class Appointment { private Doctor doctor; private Patient patient; private TimeSlot timeSlot; public Doctor getDoctor() { return doctor; } public void setDoctor(Doctor doctor) { this.doctor = doctor; } public Patient getPatient() { return patient; } public void setPatient(Patient patient) { this.patient = patient; } public TimeSlot getTimeSlot()...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT