subject

in this assignment you will demonstrate your knowledge of debugging by fixing the errors you find in the program below. fix the code, and paste it in this document, along with the list of the problems you fixed. this example allows the user to display the string for the day of the week. for example, if the user passed the integer 1, the method will return the string sunday. if the user passed the integer 2, the method will return monday. this code has both syntax errors and logic errors. hint: there are two logic errors to find and fix (in addition to the syntax errors). inport daysanddates. daysofweek; public class testdaysofweek { public static void main(string[] args) { system. out. println("days of week: "); for (int i = 0;i < 8;i++) { system. out. println("number: " + i + "\tday of week: " + dayofweek. dayofweek str(i) ) } } } package daysanddates public class daysofweek { public static string dayofweekstr(int numberofday) { string daystr = "" switch (numberofday) { case 1: daystr = "sunday"; break; case 2: daystr = "monday"; break; case 3: daystr = "tuesday" break; case 4: daystr = "wednesday"; case 5: daystr = "thursday"; break; case 6: daystr = "friday"; break; case 7: daystr = "saturday"; break; } } }

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:10
Asequential circuit contains a register of four flip-flops. initially a binary number n (0000 ≤ n ≤ 1100) is stored in the flip-flops. after a single clock pulse is applied to the circuit, the register should contain n + 0011. in other words, the function of the sequential circuit is to add 3 to the contents of a 4-bit register. design and implement this circuit using j-k flip-flops.
Answers: 1
question
Computers and Technology, 23.06.2019 20:40
Instruction active describing list features which statements accurately describe the features of word that are used to create lists? check all that apply. the tab key can be used to create a sublist. the enter key can be used to add an item to a list. the numbering feature allows for the use of letters in a list. the numbering feature can change the numbers to bullets in a list. the multilevel list feature provides options for different levels in a list.
Answers: 2
question
Computers and Technology, 24.06.2019 00:00
Which tool could be used to display only rows containing presidents who served two terms
Answers: 3
question
Computers and Technology, 24.06.2019 12:00
Match the function to its purpose. fast worth 50pts.
Answers: 1
You know the right answer?
in this assignment you will demonstrate your knowledge of debugging by fixing the errors you find in...
Questions
question
Mathematics, 26.02.2020 21:52
Questions on the website: 13722367