Java Week 2:Q1 To call the method print() in class Student following the concept of inner class. Suppose we have an ImageResource variable named picture whose current value is for an image file named dragon.png. What is the value returned from the call g(5)? Q4. What are possible conditions for this if statement? You have to call these methods to find the sum and product of two numbers. Q10. Select all that are correct. Learn to code in Java and improve your programming and problem-solving skills. Give your answer with one decimal digit. Run your program from programming exerciseParsing Weather Datato determine thelowest humidityreading in the entire year of2013. | Coulmn | UID | First_Name | Last_Name | Age | The dr that is highlighted should be DirectoryResource. Execution of two or more threads occurs in a random order. Weather dataQ 3 Run your program on weather data from May 1, 2014 in the file weather-2014-05-01.csv.What was the coldest temperature on this day? Java Week 12:Q4 A program code is given to call the parent class static method and instance method in derive class without creating object of parent class. An example is shown below: Java Week 10:Q1 The following code needs some package to work properly. The difference of x and y that is, x y. (Choose all that are correct.). Run the above code with input abcdkfjsksioehgjfhsdjfhksdfhuwabcabcajfieowj. Java Week 11:Q2 Write the required code in order to update the following data in the table PLAYERS. Using custom open-source classes, you will write programs that access and transform images, websites, and other types of data. Also, override the method calculate( ) in Test1 to calculate the volume of a Shape. Save my name, email, and website in this browser for the next time I comment. (Give your answer to three decimal places, and truncate the rest. Java Week 5:Q1 You may want to add print statements to your code and run it again to see what these values are. http://www.dukelearntoprogram.com/course2/doc/, Google Workspace Mail Management Quiz Answers, Google Workspace Security Coursera Quiz Answers, Managing Google Workspace Coursera Quiz Answers, Introduction to Computer Programming Quiz Answers, Foundations of Quantum Mechanics Coursera Quiz Answers. If your input data doesnt have any vowel it will print 0. Check whether the connection is successful using isAlive(timeout) method to generate the output, which is either true or false. document.getElementById("comment").setAttribute("id","a765b05f2781d65534871b6481444d23");document.getElementById("c99176e93e").setAttribute("id","comment"); Save my name, email, and website in this browser for the next time I comment. The count is off by 1. That It Guys, in this article I have told you about the Answers to Programming in Java Assignment 05. By registering, you agree to the Terms of Service and Privacy Policy .*. And consider the following code segment that uses the Thing class. A CSVRecord is used to get a String named export, representing the data in this column. You have to call these methods to find the sum and product of two numbers. Which of the following is not true about custom exceptions in java? Q 3. What is the output? Q 5. Run your program on the file exportdata.csv. Imagine your friend wants to get help from Coursera classmates on the discussion forums. note: if you know the answer the answer please comments. The class Test1 should include two overloading constructors as appropriate for some object instantiation shown in main( ) method. I am Ankit Kumar. After adding two additional parameters to findSimpleGene for the startCodon and stopCodon, which of the following is another change that must be made for the program to compile? In which year from 1880 to 2014 does the girls name Genevieve have the highest rank (over all the data files)? Run your program from programming exerciseParsing Weather Datato determine theaverage temperaturein Fahrenheit onAugust 10, 2013(weather-2013-08-10.csv). During the initialization, if a user enters a value other than integer value, then it will throw InputMismatchException exception. You can see that the program is finding the first two occurrences of abc but not the third. Java Week 4:Q3 The program in this assignment is attempted to print the following output: Java Week 4:Q4 To call the default method in the interface First and Second. Q 3. Which one of the following is the correct code for the if condition to determine if both the Strings exportItem1 and exportItem2 are in this CSVRecord in the export column? So, this website urges you to complete your assignment yourself. from experienced writers. Complete the code segment to catch the exception in the following, if any. You signed in with another tab or window. Q 3. At the end of the course, you will build a program that determines the popularity of different baby names in the US over time by analyzing comma-separated value (CSV) files. Q 1. You have fixed one bug in your friends code, so that it no longer throws an index out of bounds exception, by adding the condition index >= input.length() 3: Lets test some more. What was thecoldest temperaturerecorded in2013? Two if statements must be added to testSimpleGene. C) Anytime, that is, during compilation and execution of a program. What should be the correct output for input abcdkfjsksioehgjfhsdjfhksdfhuwabcabcajfieowj? D) The superclass exception must be caught at first. Do the necessary use of synchronized keyword, so that, the program prints the output in the following order: Java Week 6:Q5 Q 8. The dr that is highlighted should be listFiles. You will learn to design algorithms as well as develop and debug programs. Add necessary codes to print the following: Java Week 7:Q1 Complete the following code fragment to read three integer values from the keyboard and find the sum of the values. Hint: Be sure to review the documentation for FileResource if you do are not sure what this class does or what methods it contains: http://www.dukelearntoprogram.com/course2/doc/. Which one of the following is the first gene for this strand of DNA where you want to consider all three of the stop codons? Lets see which it is. Q 10. For example, if users input is 1, then it will throw and catch java.lang.NullPointerException. D) At the end of execution of a Java program, if there is an exception. Which line of the program is causing the error? If there is more than one year with the highest rank, choose the earliest one. Create a new object for the class, compile the program, and call the method. Complete the code segment to catch the ArithmeticException in the following, if any. Q 7. The code start = pos + 1; should go right before the line containing if (pos == -1). Hint: look at the line index = input.indexOf(abc,index+4); Q 7. What is the line of code to change pxInverts red color to the inverted red color of pxOriginal? What is (or are) the instance variable(s) in this class? It has forgotten to update the variable start. Following is a piece of code where some parts of a statement is missing: Disclaimer:These answers are provided only for the purpose to help students to take references. Q 5. Q 5. Note: You should only enter your two-digit number result, with no other additional information included. Thats All Guys! Q11. Want to Know the Answers to NPTEL Programming in Java Assignment 05? Declare a variable sum of type int and store the result in it. Q3. Q6. Q 4. Q5. LOL. Structure of Table PLAYERS is given below: Which change needs to be made to fix the bug? For example, these images show the original and inverse images of Robert. Use the following data file to answer this question:http://www.cs.duke.edu/~rodger/GRch38dnapart.fa. What are the indices printed? If input l is even then your program will print Invalid line number. Java Week 2:Q2 To call the method print() of class Student first and then call print() method of class School. This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. When the character following abc is a the program misses the next abc, When one occurrence of abc is followed immediately by another occurrence of abc, the while loop breaks, The method will never find any occurrences of abc after the second one. Run your program on weather data from May 1, 2014 in the file weather-2014-05-01.csv. Enter your answer with the printed strings separated by commas, str1, str2. An interface Number is defined in the following program. On the occurrence of such an exception, your program should print Please enter valid data .If there is no such exception, it will print the square of the number. What was the average temperature in Fahrenheit for those temperature readings when the humidity is greater than or equal to 80? Java Week 10:Q4 Complete the code segment to create a new table named PLAYERS in SQL database using the following information. Q 4. Another class Test1 is partially defined which inherits the class Shape. How many different ways are there to break out of this loop? | | | | | |. Q 6. (Give your answer to three decimal places, and truncate the rest. How many genes are there in the file brca1line.fa? Suppose Susan was born in 1972. What is the average rank of the boys name Robert over all the data files? The maximum of x and y that is, the larger value of x and y.

Use Math.sqrt( ) to calculate the square root. Java Week 1:Q2 To find the largest among three numbers x, y, and z. Java Week 1:Q3 Consider First n even numbers starting from zero(0) and calculate sum of all the numbers divisible by 3 from 0 to n. Print the sum. What is the video for the second YouTube link on the web pagehttp://www.dukelearntoprogram.com/course2/data/manylinks.htmlabout? Q 2. Run your program from the first lesson programming exercise Parsing Export Data on the file exportdata.csv. Which one of the following best describes what happens when one compiles a Java program in BlueJ on their computer? What is the total number of girls born in 1990 with names ranked higher than the girls name Emily in 1990? Consider the following Java statements. Also , define a method distance(Point p1, Point p2) to calculate the distance between points p1 and p2 and return the value in double. Java Week 2:Q3 To call print() method of class Question by creating a method named studentMethod(). Q4. Q 6. The function computes the sum of those points from the Shape s that have a positive X and a negative Y. Q4. Consider the following mystery method. Note that the method findSqr(n) will return the square of the number n. Java Week 5:Q2 Q 11. What is the value of c after these lines execute? Week 1 I found by myself. On the occurrence of such an exception, your program should print exception occur .If there is no such exception, it will print the required output. It will be e-verifiable atnptel.ac.in/noc. Java Week 3:Q1 To the generation of Fibonacci numbers. In the method twoOccurrences, suppose pos is the value of the first occurrence of stringa when stringa is found. In which year from 1880 to 2014 does the boys name Mich have the highest rank (over all the data files)? Another class Test1 is partially defined which inherits the class Shape. You have to declare a class A, which will implement the interface Number. Q 1. Disclaimer: We do not claim 100% surety of answers, these answers are based on our sole knowledge, and by posting these answers we are just trying to help students, so we urge do your assignment on your own. The Joy of Computing Using Python NPTEL Assignment Answers Week 1, 2021-22 sikshapath.in, All Rights Reserved, NPTEL Programming in Java Week 1 Quiz Assignment Answer July & August 2022, The Joy of Computing Using Python NPTEL Assignment Answers Week 1 2022. Q 8. Which one of the following conditionals correctly evaluates to true if the integer num is an odd number and to false if it is an even number. Q 3. How many genes in this file are longer than 60? For example, for the string puppy, .length() would calculate a value of 5. Q1. Please briefly explain why you feel this answer should be reported. note: If you know the Answer please comments. Java Week 1:Q5 To help Ram , find the highest mark and average mark secured by him in s number of subjects. Week 5 My method findAbc() works on abcdabc but is giving me the wrong answer with input abcdkfjsksioehgjfhsdjfhksdfhuwabcabcajfieowj. The keyword synchronized in Java is used to control the execution of thread in a strict sequence. Your Java program opens and processes the data files specified in your program. Check all that are correct. Lets see which occurrences of abc the program is finding. What is the name of the country that is listed as the third country that exports both gold and diamonds? What is the output when you run it with input abcabcabcabca? Java Week 3:Q3 A class Shape is defined with two overloading constructors in it. Please briefly explain why you feel this user should be reported. Compile the program, call the method, and then create a new object for the class. The function computes the percentage of those points from the Shape s that have a positive X or a negative Y. My method findAbc() is giving me the wrong answer. Consider the following Java methods. How many genes are there in the file brca1line.fa that are longer than 60? You have to enter an index valuen. Q 1. Suppose the name of the file that has the coldest temperature is obtained with this line of code: Which one of the following must be true about something? YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF THE AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. Questions 13 refer to the data file exportdata.csv, available in the .zip download here. Consider the following Java statements. Week 6 B) The superclass exception cannot be caught at first. Q 10. Add a line to print the index before found is calculated. Run your program on the data files for the year 2014. Consider writing a program to create new images that are photographic negatives (or inverted images) of selected images. If cr is a CSVRecord from one of the weather data files, which one of the following is a correct way to add a temperature from the file to an accumulating double variable named total? What is the output? Create a new method to read each image from a file and save the image. The variable f is a file of an image and the method makeGray returns an image that is the grayscale image of the original image. Your friend is trying to solve the following problem using Java: Write a method that finds each occurrence of abc_ in a String input (where _ is a single character) and prints bc_ for each such occurrence. This program is to find the GCD (greatest common divisor) of two integers writing a recursive function findGCD(n1,n2). Follow the given code and complete the program so that your program prints the message NPTEL Java. Run your program on weather data from 2014. For example, if the output were bcq, bcd, and bcu, you would write: bcq, bcd, bcu. Consider the following segment of code from a program. Q6. So we know that when the variable index is updated after finding the second occurrence of abc at index 30, it must be updated either to -1 or to something greater than or equal to the length of input 3. (Give your answer to four decimal places, and truncate the rest. At whattime of daydid that humidity occur? Which of the following is a type of Java Exception? You have to complete the code using only one try-catch block to handle all the possible exceptions. In the following program, a thread class ThreadRun is created using the Runnable interface which prints Thread using Runnable interface. This article will tell you the answer to theNational Programme on Technology Enhanced Learning(NPTEL)Course Programming in Java. The minimum of x and y that is, the smaller value of x and y. Java Week 2:Q4 To call default constructor first and then any other constructor in the class Answer.

Based on her names rank in 1972, what would her name be if she were born in 2014 (that is, what name in 2014 had the same rank that Susan had in 1972)? The method getNumPoints returns the number of points in a Shape s. Which one of the following is NOT a correct implementation of getNumPoints? Java Week 8:Q5 Write a program to display any digit(n) from 0-9 using 7 segment display. Q 2. Enter your answer with the printed strings separated by commas, str1, str2. You have to complete the program so that it should should print the number of vowels in s1 . Your email address will not be published. Java Week 5:Q4 What is the boys name of rank 450 in 1982? What is the length of input for this method call? Suppose the file words.txt contains the following lines: Which one of the following would be the output from this code segment? Lost your password? Which one of the following is NOT a primitive type? Q 1. Which one of the following is the missing code to find and print all the YouTube URLs? Suppose one wants to convert a given image to grayscale and then display and save the resulting grayscale image as a file. Run your program developed inParsing Weather Datato determine thelowest humidityin the file forJune 29th, 2014(weather-2014-06-29.csv). The code start = pos; should go immediately after the line containing countcg += 1; something must be of type DirectoryResource. So far so good! Java Week 6:Q3

Q 5. What is the name of thethird country(on the third line of the output) listed whose exports are valued atone trillion US dollars or more? Comment out the line findAbc(abcd) and add a new line in the test() method: What should the output be if the method is working correctly? In inverting an image, a pixels red, blue and green components are modified to be the exact opposite within the 0 to 255 range. Q 1. Java Week 2:Q3 To call print() method of class Question by creating a method named studentMethod(). In the following, the program is expected to print some numbers. Suppose there is a CSV file with a column named Exports. Shown below is the code that was developed in one of the videos to convert many images to grayscale and to display those grayscale images. Before you start writing your own Java programs, it is important you fully understand what your Java code will do. Which of the following would be the most helpful way to describe the problem so that others can easily help? The .class file is translated into a file that can be run on that computer. Week 10 Which one of the following best explains what the error is? What is the length of the longest gene in the collection of genes found in this file? A partial code is given defining two methods, namely sum( ) and multiply ( ). On the occurrence of such an exception, your program should print Exception caught: Division by zero. If there is no such exception, it will print the result of division operation on two integer values. Q 1. Week 11 Which one of the following best describes the purpose of this function? Q2. Run your program on weather data from March 30, 2014 in file weather-2014-03-30.csv. Cannot retrieve contributors at this time. Consider finding all the YouTube links on a web page. Complete the code segment to print the following using the concept of extending the Thread class in Java: Java Week 6:Q2 This code attempts to count the number of Cs in dna but has an error. Run your program on the file exportdata.csv. Answer : 58.775. Create a new BlueJ project. The method findAbc() never works when the String input is longer than 6 characters. Q7. 1 point. Week 7 Your program should utilize the given interface/ class. Which one of the following best describes what you need to do in order to run the program? Q3. Q 3. Which one of the following is a correct version of the code for comparing the name of a country that is in a CSV file that the CSVParser variable parser is processing to see if it is the same name as the String variable country? Java Week 2:Q1 To call the method print() in class Student following the concept of inner class. Use the following data file to answer this question:http://www.cs.duke.edu/~rodger/GRch38dnapart.fa. A part of the Java program is given, which can be completed in many ways, for example using the concept of thread, etc. Q 3.

Q 3. Java Week 2:Q5 To debug the program which is intended to print NPTEL JAVA. Q 6. Answer: GhanaQ4. Which of the following lines of code assigns pos2 to the second occurrence of stringa if there is a second occurrence? Java Week 6:Q4 And consider the following code segment that uses the class Thing. (Refer to the time from theDateUTCcolumn.). Test method findAbc() by adding a line in the test() method: Do this example by hand. Run your program from programming exerciseParsing Weather Datato determine thelowest humidityin the file forJuly 22nd, 2014(weather-2014-07-22.csv). Java Week 1:Q5 To help Ram , find the highest mark and average mark secured by him in "s" number of subjects. See the following code segment below. Which of the following best describes the error? Which one of the following would be the most helpful way to describe the problem so that others can easily help? So read the complete article carefully. A) The subclass exception cannot be caught at first. Run your program on the file exportdata.csv. Q 4. Which of the following is not true about throw, B) Throw can be used to declare multiple exceptions. Follow me personally onInstagramandTwitter. Further, that software should be platform-independent, Internet-enabled, easy to modify, secure, and robust. | Type | Integer | Varchar(45) | Varchar(45) | Integer | Which of the option is correct regarding multiple catch blocks? Also, override the method calculate( ) in Test1 to calculate the volume of a Shape. The recursive function should have the prototype. Crafted with by Ankit Kumar, Click to share on Twitter (Opens in new window), Click to share on Facebook (Opens in new window), Click to share on LinkedIn (Opens in new window), Click to email a link to a friend (Opens in new window), Click to share on WhatsApp (Opens in new window), Click to share on Telegram (Opens in new window), Click to share on Pinterest (Opens in new window), Data Analytics with Python Assignment 02 Answers | January 2022 | NPTEL | Week 02 | The Today Blog, Soft Skill Development Assignment 03 Answers | January 2022 | NPTEL | Week 03 | The Today Blog. How many countries export sugar?Answer: 21Q6. Complete the main class to create a thread object of the class ThreadRun and run the thread. Only The Today Blog : ). Suppose a pixel has RGB values of (100, 30, 250). Required fields are marked *. Enroll in Java Programming: Solving Problems with Software. Which one of the following shows the correct RGB values for the inverted pixel? You will receive a link and will create a new password via email. Two if statements must be added to findSimpleGene. A program file written in Java programming language. What should the output be if the method is working correctly? For example, you might do something like: What is the value of index after updating for the last time? Q8. Write suitable code to achieve this transformation as shown below: Java Week 9:Q5 Write suitable code to develop a 2D Flip-Flop Array with dimension 5 5, which replaces all input elements with values 0 by 1 and 1 by 0. Give your answer withthreedecimal digits and truncate the rest. Q 6. Java Week 3:Q2 Define a class Point with two fields x and y each of type double. Please enter your email address. The count should be initialized to 1 to take into account the first TG that is found. Week 3 Which of the following is not an exception in Java? The function computes the sum of those points from the Shape s that have a positive X or a negative Y. The code start = pos 1; should go immediately after the line containing countcg += 1. The code below has been started for you. Join us on telegram for more assignment answers. Give your answer withfourdecimal digits and truncate the rest. Q 4. Your function should return -1, if the argument(s) is(are) other than positive number(s). Also , define a method distance(Point p1, Point p2) to calculate the distance between points p1 and p2 and return the value in double. You should write the appropriate code so that the program print the contents of static method() and instance method () of parent class. Now, the Java programming language is being used for mobile programming, Internet programming, and many other applications compatible with distributed systems. Q1. Q 3. Note that 255 34 is 221, 255 198 is 57, and 255 240 is 15. Weve updated the answers you mentioned! please provide us with more correct answers for helping other students.Weve added your email and name in our potential list at the end of the month, our team will reach back to you for offering exciting goodies for free! Java Week 12:Q3 Write a program to create a record by taking inputs using Scanner class as first name as string ,last name as string ,roll number as integer ,subject1 mark as float,subject2 mark as float. Q 1. Java Week 2:Q5 To debug the program which is intended to print 'NPTEL JAVA'. Q6. Test your method on the input options that would have caused the bug (see question 7). Hint: The countrys Value (dollars) string in the CSV file should have a greater length than the string $999,999,999,999. BlueJ is an object-oriented programming language. infytq mcq