Programming in Java | Week 7
Session: JAN-APR 2024
Course name: Programming In Java
Course Link: Click Here
For answers or latest updates join our telegram channel: Click here to join
These are NPTEL Programming In Java Week 7 Assignment 7 Answers
Q1. Which stream does Java application uses to read data from a source, it may be a file, an array, peripheral device or socket? a. InputStream b. OutputStream c. Input/OutputStream d. None of the above
Answer: a. InputStream
Q2. What is the primary purpose of input streams in Java? a. To write data to a file. b. To read data from a file. c. To append data to a file. d. To create directories.
Answer: b. To read data from a file.
Q3. Which class in Java is used to create a new directory? a. FileReader b. FileWriter c. File d. Directory
Answer: c. File
Q4. Which class in Java is used to read data line by line from a file? a. BufferedReader b. FileInputStream c. FileWriter d. OutputStream
Answer: a. BufferedReader
Q5. What does the following code do? FileInputStream fis = new FileInputStream(“test.dat”);
a. It creates a new file named test.dat if it does not exist and opens the file so you can write to it, if write permission is available. b. It thows an error if the file named test.dat does not exist and opens the file, if it exists, so you can read from it and write into it, if write permission is available.
c. It creates a new file named test.dat regardless of whether it exists or not and opens the file so you can write to it, if write permission is available. d. It creates a new file named test.dat regardless of whether it exists or not and opens the file so you can read from it and write to it, if write permission is available.
Answer: b. It thows an error if the file named test.dat does not exist and opens the file, if it exists, so you can read from it and write into it, if write permission is available.
Q6. What is the output of this program? (Assume ‘inputoutput.java’ file exists in the current directory) a. true b. false c. prints number of bytes in file d. prints number of characters in the file
Answer: c. prints number of bytes in file
Q7. What will be the output of the following Java program? a. abc b. abcd c. abcde d. none of the mentioned
Answer: d. none of the mentioned
Q8. What is the output of the following Java program? a. 30 b. Compiler Error c. Garbage value d. 0
Answer: b. Compiler Error
Q9. In order to restrict a variable of a class from inheriting to subclass, how variable should be declared? a. Protected b. Private c. Public d. Static
Answer: b. Private
Q10. A _________ is a type of object that organizes components in a container. a. Event adapter b. Event Handler c. Layout manager d. Grid Manager
Answer: c. Layout manager
Programming Assignment
Question 1 A Student class with private fields (name, age) is provided, Your task is to make the following: a parameterized constructor to initialize the private fields the getter/setter methods for each field Follow the naming convention as given in the main method of the suffix code.
Question 2 A BankAccount class with private field balance is provided, Your task is to make the following: a parameterized constructor to initialize the private field public void deposit(âŠ) // to deposit money public void withdraw(âŠ) // to withdraw money, should print “Insufficient funds!” if not enough money to withdraw public double getBalance() // to return the current balance Follow the naming convention as given in the main method of the suffix code.
Question 3 An abstract class shape is provided, Your task is to make the following: a parameterized constructor to initialize the Circle class @Override the area function to compute the area of a circle (Use Math.PI for value of pi, not 22/7) @Override the displayInfo() function to print exactly in the format provided by the test cases. Follow the naming convention as given in the main method of the suffix code.
Question 4 An interface shape is provided, Your task is to make the following: Create a class “Circle” that implements the “Shape” interface and provides its own implementation for calculateArea(). @Override the area function to compute the area of a circle (Use Math.PI for value of pi, not 22/7) Create another class “Rectangle” that implements the “Shape” interface and provides its own implementation for calculateArea(). @Override the area function to compute the area of a rectangle Follow the naming convention as given in the main method of the suffix code.
Question 5 Two interfaces are provided, namely Flyable and Swimmable, Your task is to make the following: Create a class “FlyingFish” that implements both interfaces and provides its own implementation for fly() and swim() It should have a private variable name, use a constructor to set the value and the functions fly() and swim() to print exactly as given in the test case. Follow the naming convention as given in the main method of the suffix code.
More Weeks of Programming In Java: Click here
More Nptel Courses: https://progiez.com/nptel-assignment-answers
Session: JULY-DEC 2023
Course Name: Programming In Java
Question 1 Complete the following code fragment to read three integer values from the keyboard and find the sum of the values. Declare a variable “sum” of type int and store the result in it.
Question 2 Complete the code segment to catch the exception in the following, if any. 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”.
Question 3 A byte char array is initialized. You have to enter an index value”n”. According to index your program will print the byte and its corresponding char value. Complete the code segment to catch the exception in the following, if any. 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.
Question 4 The following program reads a string from the keyboard and is stored in the String variable “s1”. You have to complete the program so that it should should print the number of vowels in s1 . If your input data doesn’t have any vowel it will print “0”.
Question 5 A string “s1” is already initialized. You have to read the index “n” from the keyboard. Complete the code segment to catch the exception in the following, if any. On the occurrence of such an exception, your program should print âexception occurâ .If there is no such exception, your program should replace the char “a” at the index value “n” of the “s1” ,then it will print the modified string.
More Nptel Courses: Click here
Session: JAN-APR 2023
Course Name: Programming in Java
Q1. Which of these is a type of IO stream in Java? a. Integer stream b. Short stream c. Byte stream d. Character stream
Answer: c, d
Q2. Which of the following is a class in java.io package? a. FileReader b. ObjectInput c. ObjectOutput d. Datalnput
Answer: a. FileReader
Q3. Consider the following program. What will be the output if the above program is executed? a. It will give compile-time error. b. B c. 66 d. r
Answer: d. r
Q4. Consider the following program. What is the output of the above code? a. java/programm/2023 b. java’programm/ c. java d. 2023
Answer: d. 2023
Q5. Which method is used to read b length bytes from the input stream into an array? a. public void read(int b)throws IOException { { b. public int read(byte[ ] b)throws IOException {} c. public void read(byte[ ] b)throws IOException {} d. public int read(int b)throws IOException {}
Answer: b. public int read(byte[ ] b)throws IOException {}
Q6. How many standard streams Java can support? a. 2 b. 3 c 4 d. 1
Answer: b. 3
Q7. Which of the following stream is different from others? a. System.in b. System.out c. PrintStream d. FileOutputStream
Answer: c. PrintStream
Q8. Which of the following is used to read a string from the input stream? a. get() b. readLine( ) c. getLine( ) d. read()
Answer: b. readLine( )
Q9. Which of the following class(es) can be used for handling files in Java? a. java files b. java.io.File c. java.io d. java Filehandling
Answer: b. java.io.File
Q10. Which of the following statement(s) is/are true? a. The default delimiters for a Scanner object are the white space characters. b. The Scanner class has instance methods for reading each of the Java primitive types except char. c. The Scanner methods do not throw any checked exceptions. d. The Scanner class can be found in the java.util package.
Answer: a, b, c, d
Programming Assignment of Programming in Java
A byte char array is initialized. You have to enter an index value”n”. According to index your program will print the byte and its corresponding char value. Complete the code segment to catch the exception in the following, if any. 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.
The following program reads a string from the keyboard and is stored in the String variable “s1”. You have to complete the program so that it should should print the number of vowels in s1 . If your input data doesn’t have any vowel it will print “0”.
A string “s1” is already initialized. You have to read the index “n” from the keyboard. Complete the code segment to catch the exception in the following, if any. On the occurrence of such an exception, your program should print âexception occurâ .If there is no such exception, your program should replace the char “a” at the index value “n” of the “s1” ,then it will print the modified string.
Complete the following code fragment to read three integer values from the keyboard and find the sum of the values. Declare a variable “sum” of type int and store the result in it.
Complete the code segment to catch the exception in the following, if any. 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”.
More Weeks of Programming In Java: Click Here
Session: JULY-DEC 2022
Course Name: Programming in Java NPTEL
1) Which of these is method for testing whether the specified element is a file or a directory? a. IsFile() b. isFile() c. Isfile() d. isfile()
Answer: b. isFile()
2) Which of the following is/are NOT Standard Stream(s)? a. System.in b. System.out c. System.err d. System.console
Answer: d. System.console
3) What will be the output of the Java code? a. NPTEL b. NPTEL/JULY/2022 c. /NPTEL/JULY/2022 d. 2022
Answer: d. 2022
4) What will be the output if the above program is executed? a. It will give compile-time error b. It will give run-time error c. j d. 106
Answer: d. 106
5) Which method is used to write a byte to the current output stream? a. public void write(int b)throws IOException b. public void write(byte[] b)throws IOException c. public void flush()throws IOException d. public void close() throws IOException
Answer: b. public void write(byte[] b)throws IOException
6) Which method of Random AccessFile class reads a line from the file and returns String ? a. WriteInt() b. readLine() c. readInt() d. WriteDouble()
Answer: b. readLine()
7) Which of these class is not a member class of java.io package? a. File b. PrintStream c. StringReader d. Stream
Answer: d. Stream
8) Which of the following is/are interface(s) of java.io package? a. FileReader b. File Writer c. DataOutput d. DataInput
9) In which Java APIs the classes for handling all IO-streams are defined? a. java.lang b. java.util c. java.io d. java.awt
Answer: c. java.io
10) Consider the following program. If the program is executed, then what will be the output from the execution? a. length : 6 b. length : 5 c. length : 0 d. length : 1
Answer: b. length : 5
Programming Assignment Solutions
Question 1 Complete the following code fragment to read three integer values from the keyboard and find the sum of the values. Declare a variable âsumâ of type int and store the result in it.
Question 2 Complete the code segment to catch the exception in the following, if any. 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â.
Question 3 A byte char array is initialized. You have to enter an index valueânâ. According to index your program will print the byte and its corresponding char value. Complete the code segment to catch the exception in the following, if any. 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.
Question 4 The following program reads a string from the keyboard and is stored in the String variable âs1â. You have to complete the program so that it should should print the number of vowels in s1 . If your input data doesnât have any vowel it will print â0â.
Question 5 A string âs1â is already initialized. You have to read the index ânâ from the keyboard. Complete the code segment to catch the exception in the following, if any. On the occurrence of such an exception, your program should print âexception occurâ .If there is no such exception, your program should replace the char âaâ at the index value ânâ of the âs1â ,then it will print the modified string.
More NPTEL Solutions: https://progiez.com/nptel
Navigation Menu
Search code, repositories, users, issues, pull requests..., provide feedback.
We read every piece of feedback, and take your input very seriously.
Saved searches
Use saved searches to filter your results more quickly.
To see all available qualifiers, see our documentation .
- Notifications
This site is to share the solution of prgramming and quiz assignment given during the Programming In java by Prof. Debasis Samantha on NPTEL.
bkkothari2255/Programming_In_Java_NPTEL
Folders and files, repository files navigation, programming_in_java_nptel.
Navigate to Week
Week 1 Week 2 Week 3 Week 4 Week 5 Week 6 Week 7 Week 8 Week 9 Week 10 Week 11 Week 12
Java Week 1:Q1 To find the perimeter and area of a circle given a value of radius.
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.
Java Week 1:Q4 To check whether the number is an Armstrong number or not.
Java Week 1:Q5 To help Ram , find the highest mark and average mark secured by him in "s" number of subjects.
Java Week 2:Q1 To call the method print() in class Student following the concept of inner class.
Java Week 2:Q2 To call the method print() of class Student first and then call print() method of class School.
Java Week 2:Q3 To call print() method of class Question by creating a method named âstudentMethod()â.
Java Week 2:Q4 To call default constructor first and then any other constructor in the class Answer.
Java Week 2:Q5 To debug the program which is intended to print 'NPTEL JAVA'.
Java Week 3:Q1 To the generation of Fibonacci numbers.
Java Week 3:Q2 Define a class Point with two fields x and y each of type double. Also , define a method distance(Point p1, Point p2) to calculate the distance between points p1 and p2 and return the value in double. Complete the code segment given below. Use Math.sqrt( ) to calculate the square root.
Java Week 3:Q3 A class Shape is defined with two overloading constructors in it. Another class Test1 is partially defined which inherits the class Shape. The class Test1 should include two overloading constructors as appropriate for some object instantiation shown in main( ) method. You should define the constructors using the super class constructors. Also, override the method calculate( ) in Test1 to calculate the volume of a Shape.
Java Week 3:Q4 This program to exercise the call of static and non-static methods. A partial code is given defining two methods, namely sum( ) and multiply ( ). You have to call these methods to find the sum and product of two numbers.
Java Week 3:Q5 To swap two numbers using call by object reference.
Java Week 4:Q1 To execute the following program successfully. You should import the correct package(s) and/or class(s) to complete the code.
Java Week 4:Q2 To print the current year.
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.
Java Week 4:Q5 To print the following output.
Java Week 5:Q1 An interface Number is defined in the following program. You have to declare a class A, which will implement the interface Number. Note that the method findSqr(n) will return the square of the number n.
Java Week 5:Q2 This program is to find the GCD (greatest common divisor) of two integers writing a recursive function findGCD(n1,n2). Your function should return -1, if the argument(s) is(are) other than positive number(s).
Java Week 5:Q3 Complete the code segment to catch the ArithmeticException in the following, if any. 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.
Java Week 5:Q4 In the following program, an array of integer data to be initialized. During the initialization, if a user enters a value other than integer value, then it will throw InputMismatchException exception. On the occurrence of such an exception, your program should print âYou entered bad data.â If there is no such exception it will print the total sum of the array.
Java Week 5:Q5 In the following program, there may be multiple exceptions. You have to complete the code using only one try-catch block to handle all the possible exceptions.
For example, if userâs input is 1, then it will throw and catch âjava.lang.NullPointerExceptionâ.
Java Week 6:Q1 Complete the code segment to print the following using the concept of extending the Thread class in Java:
Java Week 6:Q2 In the following program, a thread class ThreadRun is created using the Runnable interface which prints "Thread using Runnable interface". Complete the main class to create a thread object of the class ThreadRun and run the thread,
Java Week 6:Q3 A part of the Java program is given, which can be completed in many ways, for example using the concept of thread, etc. Follow the given code and complete the program so that your program prints the message "NPTEL Java". Your program should utilize the given interface/ class.
Java Week 6:Q4 Execution of two or more threads occurs in a random order. The keyword 'synchronized' in Java is used to control the execution of thread in a strict sequence. In the following, the program is expected to print some numbers. Do the necessary use of 'synchronized' keyword, so that, the program prints the output in the following order:
Java Week 6:Q5 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. Declare a variable "sum" of type int and store the result in it.
Java Week 7:Q2 Complete the code segment to catch the exception in the following, if any. 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".
Java Week 7:Q3 A byte char array is initialized. You have to enter an index value"n". According to index your program will print the byte and its corresponding char value. Complete the code segment to catch the exception in the following, if any. 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.
Java Week 7:Q4 The following program reads a string from the keyboard and is stored in the String variable "s1". You have to complete the program so that it should should print the number of vowels in s1 . If your input data doesn't have any vowel it will print "0".
Java Week 7:Q5 A string "s1" is already initialized. You have to read the index "n" from the keyboard. Complete the code segment to catch the exception in the following, if any. On the occurrence of such an exception, your program should print âexception occurâ .If there is no such exception, your program should replace the char "a" at the index value "n" of the "s1" ,then it will print the modified string.
Java Week 8:Q1 Write a program which will print a pyramid of " " 's of height "n" and print the number of " " 's in the pyramid.
Java Week 8:Q2 Write a program which will print a pascal pyramid of "*" 's of height "l" .
Java Week 8:Q3 Write a program which will print a pyramid of "numbers" 's of height "n" and print the sum of all number's in the pyramid.
Java Week 8:Q4 Write a program to print symmetric Pascal's triangle of "*" 's of height "l" of odd length . If input "l" is even then your program will print "Invalid line number".
Java Week 8:Q5 Write a program to display any digit(n) from 0-9 using "7 segment display".
Java Week 9:Q1 Complete the code to develop a BASIC CALCULATOR that can perform operations like Addition, Subtraction, Multiplication and Division.
Java Week 9:Q2 Complete the code to develop an ADVANCED CALCULATOR that emulates all the functions of the GUI Calculator as shown in the image.
Java Week 9:Q3 Complete the code to perform a 45 degree anti clock wise rotation with respect to the center of a 5 Ă 5 2D Array as shown below:
Java Week 9:Q4 A program needs to be developed which can mirror reflect any 5 Ă 5 2D character array into its side-by-side reflection. 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. An example is shown below:
Java Week 10:Q1 The following code needs some package to work properly. Write appropriate code to import the required package(s) in order to make the program compile and execute successfully.
Java Week 10:Q2 Write the JDBC codes needed to create a Connection interface using the DriverManager class and the variable DB_URL. Check whether the connection is successful using 'isAlive(timeout)' method to generate the output, which is either 'true' or 'false'.
Java Week 10:Q3 Due to some mistakes in the below code, the code is not compiled/executable. Modify and debug the JDBC code to make it execute successfully.
Java Week 10:Q4 Complete the code segment to create a new table named âPLAYERSâ in SQL database using the following information.
Java Week 10:Q5 Complete the code segment to rename an already created table named âPLAYERSâ into âSPORTSâ.
Java Week 11:Q1 Complete the code segment to insert the following data using prepared statement in the existing table âPLAYERSâ.
Java Week 11:Q2 Write the required code in order to update the following data in the table âPLAYERSâ.
Java Week 11:Q3 Write the appropriate code in order to delete the following data in the table âPLAYERSâ.
Java Week 11:Q4 Complete the following program to calculate the average age of the players in the table âPLAYERSâ.
Structure of Table 'PLAYERS' is given below:
Java Week 11:Q5 Complete the code segment to drop the table named âPLAYERSâ.
Java Week 12:Q1 Complete the code to develop an extended version of the ADVANCED CALCULATOR with added special functions that emulates all the functions of the GUI Calculator as shown in the image.
Java Week 12:Q2 A partial code fragment is given. The URL class object is created in try block.You should write appropriate method( ) to print the protocol name and host name from the given url string.
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. Your program should print in the format
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. You should write the appropriate code so that the program print the contents of static method() and instance method () of parent class.
Java Week 12:Q5 Write a recursive function to print the sum of first n odd integer numbers. The recursive function should have the prototype
Contributors 2
Programming in Java | NPTEL | Week 7 quiz solutions
This set of MCQ(multiple choice questions) focuses on the Programming in Java Week 7 Solutions .
Course layout (Answers Link)
Answers COMING SOON! Kindly Wait!
Week 1 : Overview of Object-Oriented Programming and Java Programming Assignment Week 2: Java Programming Elements Programming Assignment Week 3: Input-Output Handling in Java Programming Assignment Week 4: Encapsulation Programming Assignment Week 5: Inheritance Programming Assignment Week 6: Exception Handling Programming Assignment Week 7: Multithreaded Programming Programming Assignment Week 8: Java Applets and Servlets Programming Assignment Week 9: Java Swing and Abstract Windowing Toolkit Programming Assignment Week 10: Networking with Java Week 11: Java Object Database Connectivity Week 12: Interface and Packages for Software Development
NOTE: You can check your answer immediately by clicking show answer button. Programming in Java Week 7 Solutions” contains 10 questions.
Now, start attempting the quiz.
Programming in Java Week 7 Solutions
Q1. Consider the following program. What will be the output of the above program is executed?
a) It will give compile-time error b) 102 c) 42 d) f
Answer: d) f
Q2. Which method is used to write an array of byte to the current output stream?
a) public void write(int b) throws IOException {{ b) public void flush(byte[] b) throws IOException {} c) public void write(byte[] b) throws IOException {} d) public int write(int b) throws IOException {}
Q3. Which of the followng is NOT a Standard Stream?
a) System.in b) System.out c) System.err d) System.console
Answer: d) System.console
Q4. Which of the following method(s) not included in OutputStream class?
a) close() b) write() c) skip() d) flush()
Answer: c) skip()
Q5. Which of the following method of the BufferedReader class is used for reading lines of text from the console, the file or other input streams?
a) read() b) readLine() c) readByte() d) read(byte[] b)
Answer: b) readLine()
Q6. Consider the following program. What is the output of the above code?
a) java/course/july/2023 b) java/course/july/ c) java/course/ d) 2023
Answer: a) java/course/july/2023
Q7. Which of the following is/are interface(s) in java.io package?
a) FileWriter b) FileFilter c) ObjectOutput d) DataOutput
Answer: b), c), d)
Q8. Fill in the blanks. The class DataInputStream extends _________ and implements the interface _____________.
a) FileInputStream, FileInput b) FilterInputStream, DataInput c) FilterInputStream, FileInput d) FileInputStream, DataInput
Answer: b) FilterInputStream, DataInput
Q9. Which of the following method(s) not included in InputStream class?
a) available() b) reset() c) read() d) flush()
Answer: d) flush()
Q10. Which of the following package contains a large number of stream classes that provide capabilities for processing all types of data?
a) java.awt b) java.io c) java.net d) java.util
Answer: b) java.io
Q1. Which of these is a type of IO stream in Java?
a) Integer stream b) Short stream c) Byte stream d) Character stream
Answer: c), d)
Q2. Which of the following is a class in java.io package?
a) FileReader b) ObjectInput c) ObjectOutput d) DataInput
Q3. What will be the output if the above program is executed?
a) It will give compile-time error b) B c) 66 d) r
Q4. What is the output of the above code?
a) java/program/2023 b) java/programm/ c) java d) 2023
Q5. Which method is used to read b length bytes from the input stream into an array?
a) public void read(int b) throws IOException{{ b) public int read(bute[] b) throws IOException{} c) public void read(byte[] b) throws IOException{} d) public int read(int b) throws IOException{}
Q6. How many standard streams Java can support?
a) 2 b) 3 c) 4 d) 1
Q7. Which of the following stream is different from others?
a) System.in b) System.out c) PrintStream d) FileOutputStream
Q8. Which of the following is used to read a string from the input stream?
a) get() b) readLine() c) getLine() d) read()
Q9. Which of the following class(es) can be use for handling files in Java?
a) java.files b) java.io.File c) java.io d) java.Filehandling
Q10. Which of the following statement(s) is/are true?
a) The default delimiters for a Scanner object are the white space characters b) The Scanner class has instance methods for reading each of the Java primitive types except char c) The Scanner methods do not throw any checked exceptions d) The Scanner class can be found in the java.util package
Answer: a), b), d)
Previous – Programming in Java Week 7 Solutions
Q1. Which of these is method for testing whether the specified element is a file or a directory?
a) IsFile() b) isFile() c) Isfile() d) isfile()
Answer: b) isFile()
Q2. Which of the following is/are NOT Standard Stream(s)?
Q3. What will be the output of the Java code?
a) NPTEL b) NPTEL/JULY/2022 c) /NPTEL/JULY/2022 d) 2022
Answer: d) 2022
Q4. What will be the output if the above program is executed?
a) It will give compile-time error b) It will give run-time error c) j d) 106
Answer: d) 106
Q5. Which method is used to write a byte to the current output stream?
a) public void write(int b) throws IOException b) public void write(byte[] b) throws IOException c) public void flush() throws IOException d) public void close() throws IOException
Answer: a) public void write(int b) throws IOException
Q6. Which method of RandomAccessFile class reads a line from the file and returns it as a String?
a) WriteInt() b) readLine() c) readInt() d) WriteDouble()
Q7. Which of these class is not a member class of java.io package?
a) File b) PrintStream c) StringReader d) Stream
Answer: d) Stream
Q8. Which of the following is/are interface(s) of java.io package?
a) FileReader b) FileWriter c) DataOutput d) DataInput
Q9. In which Java APIs the classes for handling all IO-streams are defined?
a) java.lang b) java.util c) java.io d) java.awt
Answer: c) java.io
Q10. If the program is executed, then what will be the output from the execution?
a) length: 6 b) length: 5 c) length: 0 d) length: 1
Answer: b) length: 5
Previous Course – Week 7 Quiz Solutions
Q1. Which of the following streams contains the classes which can work on character stream?
a) InputStream b) OutputStream c) FileReader d) FileWriter
Q2. In which Java APIs the classes for handling all IO-streams are defined?
Answer: c) j
Q4. Which of the following is the correct output for the ‘try’ portion of the code?
a) Prints the number of bytes in the file b) Prints the number of characters in the file c) Prints ‘true’, if the file is present; else prints ‘false’ d) Prints nothing, as an exception will be caught
Answer: b) Prints the number of characters in the file
Q5. Which methods is used to write an array of byte to the current output stream?
a) public void write(int b)throws IOException b) public void write(byte[] b)throws IOException c) public void flush()throws IOException d) public void close()throws IOException
Answer: b) public void write(byte[] b)throws IOException
Q6. Which of the following is/are Standard Stream(s)?
Answer: a), b), c)
Q7. Which of the following method in java.io package help in clearing the contents of the buffer?
a) flush() b) clear() c) append() d) exit()
Answer: a) flush()
Q8. Which method of RandomAcessFile class reads a line from the file and returns it as a String?
Q9. Which of the following is/are interface(s) of java.io package?
a) DataStreams detects an end-of-file condition by using EOFException, instead of testing for an invalid return value b) DataStreams uses floating point numbers to represent monetary values c) Data streams support I/O of primitive data types d) Object streams support I/O of objects
Answer: a), b), c), d)
>> Next- Programming in Java Week 6 Assignment Solutions
>> Next- Programming in Java Week 8 Assignment Solutions
For discussion about any question, join the below comment section. And get the solution of your query. Also, try to share your thoughts about the topics covered in this particular quiz.
Related Posts
Html mcq : html basics (multiple choice question), html mcq : html web browsers (multiple choice question).
C programming MCQ : Preprocessor Directives(MULTIPLE CHOICE QUESTION)
C++ mcq : c++ basics(multiple choice question), leave a comment cancel reply.
Your email address will not be published. Required fields are marked *
Save my name, email, and website in this browser for the next time I comment.
- 1st Central Law Reviews: Expert Legal Analysis & Insights
- Amazon Quiz
- Flipkart Quiz
- Play & Win 50,000 Coins
- Privacy Policy
NPTEL » Programming In Java Assignment week 7 Sep-2020
- by QuizXp Team
- October 20, 2020 March 14, 2022
NPTEL Java Assignment week 7
With the growth of Information and Communication Technology, there is a need to develop large and complex software. To meet this requirement object-oriented paradigm has been developed and based on this paradigm the Java programming language emerges as the best programming environment.
Programming in Java is a MOOC based course which is 12 weeks in duration and can fulfill the criteria of 4 credits in a year. You can visit the NPTEL SWAYAM platform and register yourself for the course. This course is brought to you by Prof. Dr. Debasis Samanta who holds a Ph.D. in Computer Science and Engineering from the Indian Institute of Technology Kharagpur.
Programming In Java 2020 Details:-
- Who Can Join: The undergraduate students from the engineering disciplines namely CSE, IT, EE, ECE, etc. might be interested in this course.
- Requirements/Prerequsites:Â The course requires that the students are familiar with a programming language such as C/C++ and data structures, algorithms.
- INDUSTRY SUPPORT:Â Â All IT companies.
Programming In Java Assignment 7 Answers 2022
Java Assignment Week 7 Answers:-
Java Week 7: Q1 .
Complete the following code/program fragment to read 3 integer values from the keyboard and find the sum of the values. Declare a variable “sum” of type int and store the result in it.
Answer/Code:-
import java.util.*; public class Question1{ public static void main (String[] args){
//Write the appropriate code to read the 3 integer values and find their sum. int a,b=0,sum=0; Scanner i = new Scanner(System.in); for(a=0; a<3; a++) { b=i.nextInt(); sum=sum+b;} System.out.println(sum);} }
Java Week 7: Q2
Complete the code to catch / find the exception in the following, if any. 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”.
import java.io. ;
public class Question2{
public static void main(String args[])
{ try{InputStreamReader r=new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(r);
String number=br.readLine();
int x = Integer.parseInt(number);
System.out.print(x x);} catch(Exception e){ System.out.print(“Please enter valid data”);}
Java Week 7: Q3
A byte char array is initialized. You have to enter an index value”n”. According to index your program will print the byte and its corresponding char value. Complete the code segment to catch /find the exception in the following, if any. 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.
Answer/code:-
import java.util.*; public class Question3 { public static void main(String[] args) { try{ byte barr[]={‘N’,’P’,’T’,’E’,’L’,’-‘,’J’,’A’,’V’,’A’,’J’,’A’,’N’,’-‘,’N’,’O’,’C’,’C’,’S’,’E’}; Scanner inr = new Scanner(System.in); int n = inr.nextInt(); // Complete the code to get specific indexed byte value and its corresponding char value. String str=new String(barr,n,1); System.out.println(barr[n]); System.out.print(str);} catch (Exception e){ System.out.println(“exception occur”);}}}
NPTEL » Programming In Java Assignment week 6 Sep-2020
Java Week 7: Q4
The following program/ code has a string from the keyboard and is stored in the String variable “s1”. Complete the program/code so that it should print the number of vowels in s1 . If your input data doesn’t have any vowel it will print “0”.
import java.io. ; import java.util. ;
public class Question4{ public static void main(String[] args) { int c=0; try{ InputStreamReader r=new InputStreamReader(System.in); BufferedReader br=new BufferedReader(r); String s1 = br.readLine(); //Write your code here to count the number of vowels in the string “s1” for(int i=0;i<s1.length();i++){ char s=s1.charAt(i); if(s==’a’||s==’A’||s==’e’||s==’E’||s==’i’||s==’I’||s==’o’||s==’O’||s==’u’|| s==’U’) {c=c+1;}} System.out.println(c); } catch (Exception e){ System.out.println(e);} } }
Java Week 7: Q5 –
A string “s1” is already initialized. You have to read the index “n” from the keyboard. Complete the code / program segment to catch the exception in the following code if any . On the occurrence of such exception, the program should print âexception occurâ.If there is no such exception then your program should replace the char “a” at the index value “n” of the “s1” , then it will print the modified string
import java.util.*; public class Question5 { public static void main(String[] args) { try{ String s1=”NPTELJAVA”; Scanner inr = new Scanner(System.in); int n = inr.nextInt(); char c=’a’; //Replace the char in string “s1” with the char ‘a’ at index “n” and print the modified string byte[] barr=s1.getBytes(); byte b1=(byte) c; barr[n]=b1; System.out.print(new String(barr));} catch (Exception e){ System.out.println(“exception occur”);} } }
Find Other Quiz Here :
Amazon Fashion Quiz Answers & Win âč1000
Amazon Great Indian Festival Quiz Answers: Win Rs. 50,000
NOTE: These codes are based on our knowledge . A nswers might be incorrect , we suggest you to not the copy-paste answers blindly.
- Review Assignment
- Announcements
- About the Course
- Explore Courses
Programming In Java : Final Feedback Form !!!
Dear students, We are glad that you have attended the NPTEL online certification course. We hope you found the NPTEL Online course useful and have started using NPTEL extensively. In this regard, we would like to have feedback from you regarding our course and whether there are any improvements, you would like to suggest. Â We are enclosing an online feedback form and would request you to spare some of your valuable time to input your observations. Your esteemed input will help us in serving you better. The link to give your feedback is: https://docs.google.com/forms/d/1MOMunAlOvhiybj3lrl_0ZxKITrK_n40mn3z2uSNAvcM/viewform We thank you for your valuable time and feedback. Thanks & Regards, -NPTEL Team
April 2024 NPTEL Exams - Hall Tickets Released!
Programming In Java : Week 11 Programming Assignment 05
Dear Students, There is typo mistake in Week 11 Programming Assignment 05. Hence the question is not considered for evaluation. The re-evaluation has been done. The updated score is displayed under Progress tab. Sorry for the inconvenience. -NPTEL Team
Programming In Java : Week 12 Programming Assignment 03
Dear Students, There is typo mistake in Week 12 Programming Assignment 03. Hence the question is not considered for evaluation. The re-evaluation has been done. The updated score is displayed under Progress tab. Sorry for the inconvenience. -NPTEL Team
Programming In Java : Week 09 Programming Assignment 02
Dear Students, There is typo mistake in Week 09 Programming Assignment 02. Hence the question is not considered for evaluation. The re-evaluation has been done. The updated score is displayed under Progress tab. Sorry for the inconvenience. -NPTEL Team
"Programming In Java" - Assignment- 12, Solution Released
Dear Participants,
The Solutions of the  Assignment - 12 under  Week - 12 for the course "Programming In Java"  has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum.
Link:Â https://drive.google.com/file/d/1MJklVONZ63AOy-GfTu0xMNiF41SNM0TS/view?usp=drive_link
Happy Learning! Thanks & Regards,
Survey on Problem Solving sessions - Programming In Java (noc24-cs43)
Dear Learners, We would like to know if the expectations with which you attended this problem solving session are being met and hence please do take 2 minutes to fill out our feedback form. It would help us tremendously in gauging the learner experience. Here is the link to the form:Â https://docs.google.com/forms/d/1-Cm5TaFF4z1Qy9euJUhGxrUqxR6kfJUHK-QpMVBNXZw/viewform Problem Solving Session Recording Videos will be uploaded inside the Separate Unit called " Problem solving Session " along with the slides used wherever applicable. Recording sheet : Â https://docs.google.com/spreadsheets/d/1veAG77qB7LJ9ARvXMrahGb9PUVXATNkrSE0Ismuqsng/edit -NPTEL Team
Programming In Java : Assignment 7 question no 5
Dear Students, There is typo mistake in assignment 7 question no 5. Hence the question is not considered for evaluation. The re-evaluation has been done. The updated score is displayed under Progress tab. Sorry for the inconvenience. -NPTEL Team
Programming In Java : Assignment 9 question no 2
Dear Students, There is typo mistake in assignment 9 question no 2. Hence the question is not considered for evaluation. The re-evaluation has been done. The updated score is displayed under Progress tab. Sorry for the inconvenience. -NPTEL Team
"Programming In Java" - Assignment- 11, Solution Released
The Solutions of the  Assignment - 11 under  Week - 11 for the course "Programming In Java"  has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum.
Link:Â https://drive.google.com/file/d/1t2MTZ0CSaqnieBgR7FdII-mAtJEACD_x/view?usp=drive_link
Programming In Java : Problem solving Session Reminder !!
Dear learners, There will be a live interactive session where a Course team member will explain some sample problems, how they are solved - that will help you solve the weekly assignments. We invite you to join the session and get your doubts cleared and learn better. Date: April 12, 2024 - Friday Time:06.00 PM - 07.00 PM Link to join: https://meet.google.com/eix-ymxs-owa Happy Learning. -NPTEL Team
Exam Format - April, 2024!!
Dear Candidate, ****This is applicable only for the exam registered candidates**** Type of exam will be available in the list: Click Here You will have to appear at the allotted exam center and produce your Hall ticket and Government Photo Identification Card (Example: Driving License, Passport, PAN card, Voter ID, Aadhaar-ID with your Name, date of birth, photograph and signature) for verification and take the exam in person. You can find the final allotted exam center details in the hall ticket. The hall ticket is yet to be released. We will notify the same through email and SMS. Type of exam: Computer based exam (Please check in the above list corresponding to your course name) The questions will be on the computer and the answers will have to be entered on the computer; type of questions may include multiple choice questions, fill in the blanks, essay-type answers, etc. Type of exam: Paper and pen Exam (Please check in the above list corresponding to your course name) The questions will be on the computer. You will have to write your answers on sheets of paper and submit the answer sheets. Papers will be sent to the faculty for evaluation. On-Screen Calculator Demo Link: Kindly use the below link to get an idea of how the On-screen calculator will work during the exam. https://tcsion.com/ OnlineAssessment/ ScientificCalculator/ Calculator.html NOTE: Physical calculators are not allowed inside the exam hall. Thank you! -NPTEL Team
Programming In Java : Problem solving Session Preponed!!
Dear learner, Due to unavoidable circumstances, The Problem solving Session organized for (April 16, 2024 - Tuesday)(06.00 PM - 08.00 PM) is Preponed to April 09, 2024 - Tuesday. We invite you to join the session and get your doubts cleared and learn better. Date: April 09, 2024 - Tuesday Time: 06.00 PM - 08.00 PM Link to join: https://meet.google.com/eix-ymxs-owa  Happy Learning. -NPTEL Team
"Programming In Java" - Assignment- 10, Solution Released
The Solutions of the  Assignment - 10 under  Week - 10 for the course "Programming In Java"  has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum.
Link:Â https://drive.google.com/file/d/142RZMyBONZQhvwh0D3NpPjM4V_-w2kMl/view
"Programming In Java" - Week 12 - Feedback Form
Dear Learners,
Thank you for enrolling in this NPTEL course and we hope you have gone through the contents for this week and also attempted the assignment.
We value your feedback and wish to know how you found the videos and the questions asked - whether they were easy, difficult, as per your expectations, etc
We shall use this to make the course better and we can also know from the feedback which concepts need more explanation, etc.
Please do spare some time to give your feedback - comprises just 5 questions - should not take more than a minute, but makes a lot of difference for us as we know what the Learners feel.
Here is the link to the form: https://docs.google.com/forms/d/1Dq0G3T4Y_mPZ9-tejAlwOvkwHAmJ8el2nW4BoI681zU/viewform
"Programming In Java" - Week 12 content is live now!!
Dear Students The lecture videos for Week 12  have been uploaded for the course "Programming In Java".  The lectures can be accessed using the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=106&lesson=107 The other lectures of this week are accessible from the navigation bar to the left. Please remember to login into the website to view contents (if you aren't logged in already). Assignment 12 for Week 12  is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=106&assessment=356 The assignment has to be submitted on or before Wednesday, 17-04-2024, 23:59 IST. Programming Assignment 1 for Week 11  is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=320 Programming Assignment 2 for Week 11  is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=335 Programming Assignment 3 for Week 11  is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=336 Programming Assignment 4 for Week 11  is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=337 Programming Assignment 5 for Week 11 is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=338 For all the Programming Assignments due date will be : Thursday, 18-04-2024, 23:59 IST As we have done so far, please use the discussion forums if you have any questions on this module. Note : Please check the due date of the assignments in the announcement and assignment page if you see any mismatch write to us immediately. Thanks and Regards, --NPTEL Team
Dear learner, Due to unavoidable circumstances, The Problem solving Session organized for (April 09, 2024 - Tuesday)(06.00 PM - 08.00 PM) is Preponed to April 05, 2024 - Friday. We invite you to join the session and get your doubts cleared and learn better. Date: April 05, 2024 - Friday Time: 06.00 PM - 08.00 PM Link to join: https://meet.google.com/eix-ymxs-owa  Happy Learning. -NPTEL Team
Programming In Java : Assignment 8 question no 7
Dear Students, There is typo mistake in assignment 8 question no 7. Hence the question is not considered for evaluation. The re-evaluation has been done. The updated score is displayed under Progress tab. Sorry for the inconvenience. -NPTEL Team
Dear learners, There will be a live interactive session where a Course team member will explain some sample problems, how they are solved - that will help you solve the weekly assignments. We invite you to join the session and get your doubts cleared and learn better. Date: April 02, 2024 - Tuesday Time:06.00 PM - 08.00 PM Link to join: https://meet.google.com/eix-ymxs-owa Happy Learning. -NPTEL Team
"Programming In Java" - Assignment- 09, Solution Released
The Solutions of the  Assignment - 09 under  Week - 09 for the course "Programming In Java"  has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum.
Link:Â https://drive.google.com/file/d/1Yh_euM0jeeMOX-RSSkEXkSF5i2JH-vaF/view?usp=drive_link
"Programming In Java" - Week 11 - Feedback Form
"programming in java" - week 11 content is live now.
Dear Students The lecture videos for Week 11  have been uploaded for the course "Programming In Java".  The lectures can be accessed using the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=98&lesson=99 The other lectures of this week are accessible from the navigation bar to the left. Please remember to login into the website to view contents (if you aren't logged in already). Assignment 11 for Week 11  is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=98&assessment=355 The assignment has to be submitted on or before Wednesday, 10-04-2024, 23:59 IST. Programming Assignment 1 for Week 11  is also released and can be accessed from the following link :  https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=343 Programming Assignment 2 for Week 11  is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=342 Programming Assignment 3 for Week 11  is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=344 Programming Assignment 4 for Week 11  is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=345 Programming Assignment 5 for Week 11 is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=346 For all the Programming Assignments due date will be : Thursday, 11-04-2024, 23:59 IST As we have done so far, please use the discussion forums if you have any questions on this module. Note : Please check the due date of the assignments in the announcement and assignment page if you see any mismatch write to us immediately. Thanks and Regards, --NPTEL Team
Important Notice:No CHANGE in NPTEL Exam Schedule for April 2024
Dear Student,
We wanted to take a moment to address an important matter regarding the upcoming election dates and their potential impact on your exam schedule.
- None of the election dates clash with scheduled exam dates. If we schedule additional dates, we will ensure they again do not clash with elections in your state.Â
- Hence this is to confirm that there will be no changes to the exam dates and they are the same as previously scheduled. We may have exams in some cities on April 19 and April 26 depending on seat availability on scheduled dates. But again this will be done ensuring we don't conduct exams on election dates in your state.Â
- Your academic progress and success remain our top priority, and we are committed to maintaining the integrity of the examination process.
- We have more than 6 lakh learners registered for April exams and logistics has been a huge challenge. We understand that some of you may need to travel to your native cities to participate in the voting process. Please remember that you selected your exam cities during registration, and it is crucial that you return to these cities to take your exams as scheduled. Since hall ticket and center allocation is under process, exam cities selected by you during exam registration cannot be changed now.Â
Hence we kindly request that you make the necessary arrangements to ensure you can both exercise your right to vote and fulfill your academic obligations.
Warm Regards,
NPTEL Team.
Dear learners, There will be a live interactive session where a Course team member will explain some sample problems, how they are solved - that will help you solve the weekly assignments. We invite you to join the session and get your doubts cleared and learn better. Date: March 26, 2024 - Tuesday Time:06.00 PM - 08.00 PM Link to join: https://meet.google.com/eix-ymxs-owa Happy Learning. -NPTEL Team
"Programming In Java" - Week 10 - Feedback Form
"programming in java" - week 10 content is live now.
Dear Students The lecture videos for Week 10  have been uploaded for the course "Programming In Java".  The lectures can be accessed using the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=90&lesson=91 The other lectures of this week are accessible from the navigation bar to the left. Please remember to login into the website to view contents (if you aren't logged in already). Assignment 10 for Week 10  is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=90&assessment=354 The assignment has to be submitted on or before Wednesday, 03-04-2024, 23:59 IST. Programming Assignment 1 for Week 10  is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=333 Programming Assignment 2 for Week 10  is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=334 Programming Assignment 3 for Week 10  is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=339 Programming Assignment 4 for Week 10  is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=340 Programming Assignment 5 for Week 10  is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=341 For all the Programming Assignments due date will be : Thursday, 04-04-2024, 23:59 IST As we have done so far, please use the discussion forums if you have any questions on this module. Note : Please check the due date of the assignments in the announcement and assignment page if you see any mismatch write to us immediately. Thanks and Regards, --NPTEL Team
"Programming In Java" - Assignment-8, Solution Released
The Solutions of the  Assignment - 08 under  Week - 08 for the course "Programming In Java"  has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum.
Link:Â https://drive.google.com/file/d/14xmMrI-pGufK8-IAcYblxVGZqzD1B-bx/view?usp=drive_link
Dear learners, There will be a live interactive session where a Course team member will explain some sample problems, how they are solved - that will help you solve the weekly assignments. We invite you to join the session and get your doubts cleared and learn better. Date: March 19, 2024 - Tuesday Time:06.00 PM - 08.00 PM Link to join: https://meet.google.com/eix-ymxs-owa Happy Learning. -NPTEL Team
"Programming In Java" - Assignment-7, Solution Released
The Solutions of the  Assignment - 7 under  Week - 7 for the course "Programming In Java"  has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum.
Link:Â https://drive.google.com/file/d/1n9XM5j0l0NpsbXivmZ9FO-zISvzrqAbM/view?usp=drive_link
"Programming In Java" - Week 9 - Feedback Form
"programming in java" - week 9 content is live now.
Dear Students The lecture videos for Week 9 Â have been uploaded for the course "Programming In Java". The lectures can be accessed using the following link :Â https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=82&lesson=83 The other lectures of this week are accessible from the navigation bar to the left. Please remember to login into the website to view contents (if you aren't logged in already). Assignment 9 for Week 9 Â is also released and can be accessed from the following link :Â https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=82&assessment=352 The assignment has to be submitted on or before Wednesday, 27-03-2024, 23:59 IST. Programming Assignment 1 for Week 9 Â is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=347 Programming Assignment 2 for Week 9 Â is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=348 Programming Assignment 3 for Week 9 Â is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=349 Programming Assignment 4 for Week 9 Â is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=350 Programming Assignment 5 for Week 9 Â is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=351 For all the Programming Assignments due date will be : Thursday, 28-03-2024, 23:59 IST As we have done so far, please use the discussion forums if you have any questions on this module. Note : Please check the due date of the assignments in the announcement and assignment page if you see any mismatch write to us immediately. Thanks and Regards, --NPTEL Team
Programming In Java : Assignment 5 question no 4
Dear Students, In assignment 5 question no 4, multiple options are correct. Hence the question is not considered for evaluation. The re-evaluation has been done. The updated score is displayed under Progress tab. Sorry for the inconvenience. -NPTEL Team
Programming In Java : Assignment 5 question no 1
Dear Students, In assignment 5 question no 1, multiple options are correct. Hence the question is not considered for evaluation. The re-evaluation has been done. The updated score is displayed under Progress tab. Sorry for the inconvenience. -NPTEL Team
Dear learners, There will be a live interactive session where a Course team member will explain some sample problems, how they are solved - that will help you solve the weekly assignments. We invite you to join the session and get your doubts cleared and learn better. Date: March 12, 2024 - Tuesday Time:06.00 PM - 08.00 PM Link to join: https://meet.google.com/eix-ymxs-owa Happy Learning. -NPTEL Team
"Programming In Java" - Week 8 content is live now!!
Dear Students
The lecture videos for Week 8  have been uploaded for the course "Programming In Java" . The lectures can be accessed using the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=74&lesson=75
The other lectures of this week are accessible from the navigation bar to the left. Please remember to login into the website to view contents (if you aren't logged in already).
Assignment 8  for Week 8  is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=74&assessment=305
The assignment has to be submitted on or before Wednesday, 20 - 03 - 2024 , 23:59 IST .
"Programming In Java" - Assignment-6, Solution Released
The Solutions of the  Assignment - 6 under  Week - 6 for the course "Programming In Java"  has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum.
Link:Â https://drive.google.com/file/d/1gECpqgdTZFkI9xoVKJ-2WEsC0OrceUEk/view?usp=drive_link
"Programming In Java" - Week 8 - Feedback Form
Dear learners, There will be a live interactive session where a Course team member will explain some sample problems, how they are solved - that will help you solve the weekly assignments. We invite you to join the session and get your doubts cleared and learn better. Date: March 08, 2024 - Friday Time: 06.00 PM - 08.00 PM Link to join: https://meet.google.com/eix-ymxs-owa Happy Learning. -NPTEL Team
Dear learners, There will be a live interactive session where a Course team member will explain some sample problems, how they are solved - that will help you solve the weekly assignments. We invite you to join the session and get your doubts cleared and learn better. Date: March 05, 2024 - Tuesday Time: 06.00 PM - 08.00 PM Link to join: https://meet.google.com/eix-ymxs-owa  Happy Learning. -NPTEL Team
"Programming In Java" - Week 7 content is live now!!
The lecture videos for Week 7  have been uploaded for the course "Programming In Java" . The lectures can be accessed using the following link https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=66&lesson=67
Assignment 7  for Week 7  is also released and can be accessed from the following link :  https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=66&assessment=304
The assignment has to be submitted on or before Wednesday, 13 - 03 - 2024 , 23:59 IST .
"Programming In Java" - Week 7 - Feedback Form
"programming in java" - assignment-5, solution released.
The Solutions of the  Assignment - 5 under  Week - 5 for the course "Programming In Java"  has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum.
Link:Â https://drive.google.com/file/d/1OVAIeH9RuBl_xDJzFdbZQnbPyOl4cYu8/view?usp=drive_link
"Programming In Java" - Programming Assignments for Week 6 is live now!!
The Programming  Assignments  for Week 6  have been uploaded for the course "Programming In Java"  in the portal and can be accessed using the following links
Please remember to login into the website to view contents (if you aren't logged in already).
Programming  Assignment 1  for Week  6  is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/progassignment?name=307
Programming In Java : Assignment 4 question no 10
Dear Students, There is answer set mistake in assignment 4 question no 10. Hence the question is not considered for evaluation. The re-evaluation has been done. The updated score is displayed under Progress tab. Sorry for the inconvenience. -NPTEL Team
Programming In Java: Assignment 3 question no 5
Dear Students, There is answer set mistake in assignment 3 question no 5. Hence the question is not considered for evaluation. The re-evaluation has been done. The updated score is displayed under Progress tab. Sorry for the inconvenience. -NPTEL Team
Programming In Java : Assignment 4 question no 9
Dear Students, There is typo mistake in assignment 4 question no 9. Hence the question is not considered for evaluation. The re-evaluation has been done. The updated score is displayed under Progress tab. Sorry for the inconvenience. -NPTEL Team
Programming In Java : Problem solving Session Postponed!!
Dear learner, Due to unavoidable circumstances, The Problem solving Session organized Tomorrow (February 27, 2024 - Tuesday)( 06.00 PM - 08.00 PM ) is Postponed to March 04, 2024 - Monday. The G-meet link for the session will be shared before the session. -NPTEL Team
NPTEL: Exam Registration date is extended for 12 week courses of Jan 2024!
- No further extension will be provided.
- This extension is only applicable for 12-week courses.
"Programming In Java" - Week 6 - Feedback Form
"programming in java" - assignment-4, solution released.
The Solutions of the  Assignment - 4 under  Week - 4 for the course "Programming In Java"  has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum.
Link:Â https://drive.google.com/file/d/1vnYtLdmy6uBmVUYBQbr_QlsABGeYwrMy/view
"Programming In Java" - Week 6 - content is live now!!
The lecture videos for Week 6 have been uploaded for the course "Programming In Java" . The lectures can be accessed using the following link: https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=58&lesson=59
Assignment - 6 for Week - 6 is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=58&assessment=303
The assignment has to be submitted on or before Wednesday, [06/03/2024 ] , 23:59 IST.
As we have done so far, please use the discussion forums if you have any questions on this module.
Note : Please check the due date of the assignments in the announcement and assignment page if you see any mismatch write to us immediately.
Thanks and Regards,
--NPTEL Team
Reminder: NPTEL: Exam Registration is date is extended for Jan 2024 courses!
Dear Learner, The exam registration for the Jan 2024 NPTEL course certification exam is extended till February 23, 2024 - 05.00 P.M . CLICK HERE to register for the exam Choose from the Cities where exam will be conducted: Exam Cities Click here to view Timeline and Guideline : Guideline For further details on registration process please refer the previous announcement in the course page. -NPTEL Team
Dear learners, There will be a live interactive session where a Course team member will explain some sample problems, how they are solved - that will help you solve the weekly assignments. We invite you to join the session and get your doubts cleared and learn better. Date: Feb 20, 2024 - Tuesday Time:06.00 PM - 08.00 PM Link to join: https://meet.google.com/eix-ymxs-owa Happy Learning. -NPTEL Team
"Programming In Java" - Week 5 - content is live now!!
The lecture videos for Week 5 have been uploaded for the course "Programming In Java" . The lectures can be accessed using the following link: https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=50&lesson=51
Assignment - 5 for Week - 5 is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=50&assessment=302
The assignment has to be submitted on or before Wednesday, [28/02/2024 ] , 23:59 IST.
"Programming In Java" - Week 5 - Feedback Form
"programming in java" - assignment-3, solution released.
The Solutions of the Assignment - 3 under Week - 3 for the course "Programming In Java"  has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum.
Link:Â https://drive.google.com/file/d/1795_GATH0FvFOdt3m53Gsb7OwhdP0VY5/view?usp=drive_link
Happy Learning! Thanks & Regards,
Dear Learner, The exam registration for the Jan 2024 NPTEL course certification exam is extended till February 20, 2024 - 05.00 P.M . CLICK HERE to register for the exam Choose from the Cities where exam will be conducted: Exam Cities Click here to view Timeline and Guideline : Guideline For further details on registration process please refer the previous announcement in the course page. -NPTEL Team
"Programming In Java" - Week 4 - content is live now!!
The lecture videos for Week 4 have been uploaded for the course "Programming In Java" . The lectures can be accessed using the following link: https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=42&lesson=43
Assignment - 4 for Week -4 is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=42&assessment=297
The assignment has to be submitted on or before Wednesday, [21/02/2024 ] , 23:59 IST.
Dear learners, There will be a live interactive session where a Course team member will explain some sample problems, how they are solved - that will help you solve the weekly assignments. We invite you to join the session and get your doubts cleared and learn better. Date: Feb 13, 2024 - Tuesday Time:06.00 PM - 08.00 PM Link to join: https://meet.google.com/eix-ymxs-owa Happy Learning. -NPTEL Team
"Programming In Java" - Assignment-1 & 2 Solution Released
Dear Learners ,
The Solutions of Assignment- 1 & 2  under Week- 1 & 2  for the course "Programming In Java"  has been releasedÂ
in the portal. Please go through the solution and in case of any doubt post your queries in the forum.
Link for assignment 1 solution:Â https://drive.google.com/file/d/1gjn_KeNy0OzwCQ_9eq_aKC2xyfwR5-f6/view?usp=drive_link
Link for assignment 2 solution:Â https://drive.google.com/file/d/1dryqNToKKQuNAtgF-EC5hx-Vc6oEdmQO/view?usp=drive_link
Happy Learning!
Thanks & Regards,
"Programming In Java" - Week 4 - Feedback Form
Feedback on nptel translation and transcripts.
Dear Learners, Do you find English difficult to follow in the NPTEL course? Would it be easier and help you if the videos had subtitles in Indian languages? We have great news for you! The videos in this course have been translated into Kannada Language But how do you change the subtitles? Follow the steps below. To watch the video having subtitles in regional language: 1. Click on the lecture under Week contents. 2. Play the video. 3. Now click on the Settings icon and a list of features will display 4. From that select the option Subtitles/CC. 5. Now select the Language from the available languages to read the subtitle in the regional language. Try this out and give us feedback! Let us know if you want more of this! https://forms.gle/i4muUY4F2NU7EzLr6 -NPTEL Team
Dear learners, There will be a live interactive session where a Course team member will explain some sample problems, how they are solved - that will help you solve the weekly assignments. We invite you to join the session and get your doubts cleared and learn better. Date: Feb 06, 2024 - Tuesday Time:06.00 PM - 08.00 PM Link to join: https://meet.google.com/eix-ymxs-owa Happy Learning. -NPTEL Team
Programming In Java - Problem Solving Session Recording is available!!
Dear Learner, We have uploaded the Recorded videos of the Live Interaction Session - Problem solving Session of Week 1 . Videos are uploaded inside the Separate Unit called " Problem solving Session " along with the slides used wherever applicable. Login to the course on swayam.gov.in to check the same. -NPTEL Team
"Programming In Java" - Week 3 - content is live now!!
The lecture videos for Week 3 have been uploaded for the course "Programming In Java" . The lectures can be accessed using the following link: https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=34&lesson=35
Assignment - 3 for Week -3 is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=34&assessment=296
The assignment has to be submitted on or before Wednesday, [14/02/2024 ] , 23:59 IST.
"Programming In Java" - Week 3 - Feedback Form
Reminder: NPTEL: Exam Registration is open now for Jan 2024 courses!
Dear Learner,Â
Here is the much-awaited announcement on registering for the Jan 2024 NPTEL course certification exam.Â
1. The registration for the certification exam is open only to those learners who have enrolled in the course.Â
2. If you want to register for the exam for this course, login here using the same email id which you had used to enroll to the course in Swayam portal. Please note that Assignments submitted through the exam registered email id ALONE will be taken into consideration towards final consolidated score & certification.Â
3 . Date of exam: Apr 27, 2024Â
CLICK HERE to register for the exam.
Choose from the Cities where exam will be conducted: Exam Cities
4. Exam fees:Â
If you register for the exam and pay before Feb 12, 2024 - 5:00 PM, Exam fees will be Rs. 1000/- per exam .
5. 50% fee waiver for the following categories:Â
Students belonging to the SC/ST category: please select Yes for the SC/ST option and upload the correct Community certificate.
Students belonging to the PwD category with more than 40% disability: please select Yes for the option and upload the relevant Disability certificate.Â
6. Last date for exam registration: Feb 16, 2024 - 5:00 PM (Friday).Â
7. Between Feb 12, 2024 - 5:00 PM & Feb 16, 2024 - 5:00 PM late fee will be applicable.
8. Mode of payment: Online payment - debit card/credit card/net banking/UPI.Â
9. HALL TICKET:Â
The hall ticket will be available for download tentatively by 2 weeks prior to the exam date. We will confirm the same through an announcement once it is published.Â
10. FOR CANDIDATES WHO WOULD LIKE TO WRITE MORE THAN 1 COURSE EXAM:- you can add or delete courses and pay separately â till the date when the exam form closes. Same day of exam â you can write exams for 2 courses in the 2 sessions. Same exam center will be allocated for both the sessions.Â
11. Data changes:Â
Last date for data changes: Feb 16, 2024 - 5:00 PM : Â
We will charge an additional fee of Rs. 200 to make any changes related to name, DOB, photo, signature, SC/ST and PWD certificates after the last date of data changes.
The following 6 fields can be changed (until the form closes) ONLY when there are NO courses in the course cart. And you will be able to edit those fields only if you: -Â
REMOVE unpaid courses from the cart And/or - CANCEL paid coursesÂ
1. Do you come under the SC/ST category? *Â
2. SC/ST ProofÂ
3. Are you a person with disabilities? *Â
4. Are you a person with disabilities above 40%?Â
5. Disabilities ProofÂ
6. What is your role?Â
Note: Once you remove or cancel a course, you will be able to edit these fields immediately.Â
But, for cancelled courses, refund of fees will be initiated only after 2 weeks.Â
12. LAST DATE FOR CANCELLING EXAMS and getting a refund: Feb 16, 2024 - 5:00 PM Â
13. Click here to view Timeline and Guideline : Guideline
Domain Certification
Domain Certification helps learners to gain expertise in a specific Area/Domain. This can be helpful for learners who wish to work in a particular area as part of their job or research or for those appearing for some competitive exam or becoming job ready or specialising in an area of study. Â
Every domain will comprise Core courses and Elective courses. Once a learner completes the requisite courses as per the mentioned criteria, you will receive a Domain Certificate showcasing your scores and the domain of expertise. Kindly refer to the following link for the list of courses available under each domain: https://nptel.ac.in/domains
Outside India Candidates
Candidates who are residing outside India may also fill the exam form and pay the fees. Mode of exam and other details will be communicated to you separately.
Thanks & Regards,Â
Dear learners, There will be a live interactive session where a Course team member will explain some sample problems, how they are solved - that will help you solve the weekly assignments. We invite you to join the session and get your doubts cleared and learn better. Date: Jan 30, 2024 - Tuesday Time:06.00 PM - 08.00 PM Link to join: https://meet.google.com/eix-ymxs-owa Happy Learning. -NPTEL Team
"Programming In Java" - Assignment-0. Solution Released
The Solution of Assignment - 0 under Week - 0 for the course "Programming In Java " has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum.
Link: https://drive.google.com/file/d/1l7O2FKZDgX-OZfhzRkyZFU1LEnJJbW3k/view
"Programming In Java" - Week 2 - Feedback Form
"programming in java" - week 2 - content is live now.
The lecture videos for Week 2 have been uploaded for the course "Programming In Java" . The lectures can be accessed using the following link: https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=26&lesson=27
Assignment - 2 for Week -2 is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=26&assessment=295
The assignment has to be submitted on or before Wednesday, [07/02/2024 ] , 23:59 IST.
"Programming In Java" - Download video links are available now!!
The download video link for the course "Programming In Java" is available now in the course outline. Please check the download video link: https://nptel.ac.in/courses/106105191
-NPTEL Team
Programming In Java - Week 1 assignment is live now!!
The A ssignment 1 for Week 1 for the course " Programming In Java " is made available now.
Assignment 1 can be accessed using the this link : https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=18&assessment=298
The other Assignment 1 is accessible from the navigation bar to the left under Week 1. Please remember to login into the website to view contents (if you aren't logged in already).
The assignment has to be submitted on or before Wednesday, 7th Feb 2024 , 23:59 IST.
Please use the discussion forums if you have any questions on this module.
"Programming In Java" - Week 1 - Feedback Form
"programming in java" - week 1 - content is live now.
The lecture videos for Week 1 have been uploaded for the course "Programming In Java" . The lectures can be accessed using the following link: https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=18&lesson=19
Assignment - 1 for Week -1 is also released and can be accessed from the following link : https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=18&assessment=294
"Programming In Java" - Assignment-0-RELEASED
We welcome you all to this course. The Assignment 0 for the course "Programming In Java "  has been released. This assignment is based on a prerequisite of the course. Kindly note that marks obtained in this assignment will not be considered for the final assessment. You can find the assignment under Week 0 unit on the left-hand side of your screen. You can submit the assignment multiple times. All the best !!   Â
NPTEL: Exam Registration is open now for Jan 2024 courses!
Programming in java: welcome to nptel online course - jan 2024.
- Every week, about 2.5 to 4 hours of videos containing content by the Course instructor will be released along with an assignment based on this. Please watch the lectures, follow the course regularly and submit all assessments and assignments before the due date. Your regular participation is vital for learning and doing well in the course. This will be done week on week through the duration of the course.
- Please do the assignments yourself and even if you take help, kindly try to learn from it. These assignments will help you prepare for the final exams. Plagiarism and violating the Honor Code will be taken very seriously if detected during the submission of assignments.
- The announcement group - will only have messages from course instructors and teaching assistants - regarding the lessons, assignments, exam registration, hall tickets, etc.
- The discussion forum (Ask a question tab on the portal) - is for everyone to ask questions and interact. Anyone who knows the answers can reply to anyone's post and the course instructor/TA will also respond to your queries.
- Please make maximum use of this feature as this will help you learn much better.
- If you have any questions regarding the exam, registration, hall tickets, results, queries related to the technical content in the lectures, any doubts in the assignments, etc can be posted in the forum section
- The course is free to enroll and learn from. But if you want a certificate, you have to register and write the proctored exam conducted by us in person at any of the designated exam centres.
- The exam is optional for a fee of Rs 1000/- (Rupees one thousand only).
- Date and Time of Exams: April 27, 2024 Morning session 9am to 12 noon; Afternoon Session 2 pm to 5 pm.
- Registration URL: Announcements will be made when the registration form is open for registrations.
- The online registration form has to be filled and the certification exam fee needs to be paid. More details will be made available when the exam registration form is published. If there are any changes, it will be mentioned then.
- Please check the form for more details on the cities where the exams will be held, the conditions you agree to when you fill the form etc.
- Once again, thanks for your interest in our online courses and certification. Happy learning.
A project of
In association with
- Saturday, May 4, 2024
NPTEL Programming in Java Week7 Assignment Solution July 2023
NPTEL Programming in Java Week7 All Programming Assignment Solutions – July 2023 | Swayam. With the growth of Information and Communication Technology, there is a need to develop large and complex software.
Further, those software should be platform independent, Internet enabled, easy to modify, secure, and robust. To meet this requirement object-oriented paradigm has been developed and based on this paradigm the Java programming language emerges as the best programming environment.
Now, Java programming language is being used for mobile programming, Internet programming, and many other applications compatible to distributed systems.
This course aims to cover the essential topics of Java programming so that the participants can improve their skills to cope with the current demand of IT industries and solve many problems in their own filed of studies.
COURSE LAYOUT
- Week 1 : Overview of Object-Oriented Programming and Java
- Week 2 : Java Programming Elements
- Week 3 : Input-Output Handling in Java
- Week 4 : Encapsulation
- Week 5 : Inheritance
- Week 6 : Exception Handling
- Week 7 : Multithreaded Programming
- Week 8 : Java Applets and Servlets
- Week 9 : Java Swing and Abstract Windowing Toolkit (AWT)
- Week 10 : Networking with Java
- Week 11: Java Object Database Connectivity (ODBC)
- Week 12: Interface and Packages for Software Development
Course Name : âProgramming in Java 2023â
Question : 1 Complete the following code fragment to read three integer values from the keyboard and find the sum of the values. Declare  a variable  “sum” of type int and store the result in it.
Question : 2Â Complete the code segment to catch the exception in the following, if any. 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 “.
Question : 3 Â A byte char array is initialized. You have to enter an index value” n “. According to index your program will print the byte and its corresponding char value. Complete the code segment to catch the exception in the following, if any. 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.
Question : 4Â The following program reads a string from the keyboard and is stored in the String variable “ s1 “. You have to complete the program so that it should should print the number of vowels in s1 . If your input data doesn’t have any vowel it will print “ 0 “.
Question : 5  A string “ s1 ” is already initialized. You have to read the index “ n ” from the keyboard. Complete the code segment to catch the exception in the following, if any. On the occurrence of such an exception, your program should print â exception occur â. If there is no such exception, your program should replace the char “ a ” at the index value “ n ” of the “ s1 “, then it will print the modified string.
Programming in Java NPTEL Assignment Answers of Week 7(2023)
In this post We are solving the Programming in Java NPTEL Assignment Answers of Week 7(2023)
1] Which of these is a type of IO stream in Java? a] Integer stream b] Short stream c] Byte stream d] Character stream
Answer : c , d
2] Which of the following is a class in java. io package? a] FileReader b] ObjectInput c] ObjectOutput d] Datalnput
3] Consider the following program.
What will be the output if the above program is executed? a] It will give compile-time error.
4] Consider the following program.
What is the output of the above code? a] java/programm/2023 b] java/programm/ c] java d] 2023
5] Which method is used to read b length bytes from the input stream into an array? a] public void read(int b)throws IOException{ { b] public int read(byte[ ] b)throws IOException { } c] public void ] b)throws IOException{} d] public int read(int b)throws IOException { }
6] How many standard streams Java can support?
7] Which of the following stream is different from others? a] System.in b] System.out c] PrintStream d] FileOutputStream
8] Which of the following is used to read a string from the input stream?
a] get() b] readLine( ) c] getLine( ) d] read( )
9] Which of the following class(es) can be used for handling files in Java? a] java.files b] java.io.File c] java.io d] java.Filehandling
10] Which of the following statement(s) is/are true? a] The default delimiters for a Scanner object are the white space characters. b] The Scanner class has instance methods for reading each of the Java primitive types except char. c] The Scanner methods do not throw any checked exceptions. d] The Scanner class can be found in the java.util package.
Answer : a , b, d
Week 7 : Programming Assignment 1
1] A byte char array is initialized. You have to enter an index valueânâ. According to index your program will print the byte and its corresponding char value. Complete the code segment to catch the exception in the following, if any. 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.
Week 7 : Programming Assignment 2
2] The following program reads a string from the keyboard and is stored in the String variable âs1â. You have to complete the program so that it should should print the number of vowels in s1 . If your input data doesnât have any vowel it will print â0â.
Week 7 : Programming Assignment 3
3] A string âs1â is already initialized. You have to read the index ânâ from the keyboard. Complete the code segment to catch the exception in the following, if any. On the occurrence of such an exception, your program should print âexception occurâ .If there is no such exception, your program should replace the char âaâ at the index value ânâ of the âs1â ,then it will print the modified string.
Week 7 : Programming Assignment 4
4] Complete the following code fragment to read three integer values from the keyboard and find the sum of the values. Declare a variable âsumâ of type int and store the result in it.
Week 7 : Programming Assignment 5
5] Complete the code segment to catch the exception in the following, if any. 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â.
Related Posts
Explain network layer design issues..
- April 4, 2024
AngularJS application that displays the date
- March 12, 2024
AngularJS application to convert student details to Uppercase
Leave a reply cancel reply.
Your email address will not be published. Required fields are marked *
Add Comment  *
Save my name, email, and website in this browser for the next time I comment.
Post Comment
- Guidelines to Write Experiences
- Write Interview Experience
- Write Work Experience
- Write Admission Experience
- Write Campus Experience
- Write Engineering Experience
- Write Coaching Experience
- Write Professional Degree Experience
- Write Govt. Exam Experiences
- Servicenow Project Portfolio Management PPM
- What is Project Management?
- What is Project Scope Management Plan?
- Which are the Best Project Management Courses?
- What are the Principles of Project Management?
- What is Critical Path in Project Management?
- Why Project Portfolio Management is Important?
- What Is Project Procurement Management?
- What Is Project Management Consultancy?
- Why Is Project Management Important?
- What is creative project management?
- What is Planning in Project Management?
- What Is Project Management Software?
- Various roles in Project Management
- Project Management Tutorial
- Phases of the Project Management Lifecycle
- What is Project Management System?
- What is a project in project management?
- Project Direction - Project Management
Project Management NPTEL Course Review
Hello Friends in this article I’m gonna explain to you about the NPTEL course called “Project Management “
About Nptel :
NPTEL Full Form is called as “National Programme on Technology Enhanced Learning ” founded by 7 IIT And 1 IISC for Quality Course Contents.
WHY I LOVE NPTEL:
- Free Course Contents
- Quality Content
- IIT Classroom teaching
- Knowledgeable professors in the respective field.
PROJECT MANAGEMENT COURSE REVIEW :
- It is an eight-week project management course taught by Prof. Anbanandam.
- He covers the introduction to project management, the roles of a manager, how a project manager works, Gantt chart calculation, and many more topics.
- Overall, the course is average.
- I had never seen a professor who simply reads PowerPoint slides and teaches without interacting with the students (very poor). He should provide explanations with many more examples in real time.
- My allocated exam center was JNN INSTITUTE OF TECHNOLOGY, Kannigaipair, Thiruvallur, Chennai.
ASSIGNMENT VALUATION :
- Since it is an 8-week course best of 6 will be calculated for the exam, 25 percent.
- 100 marks external which they evaluate for 75 percentage.
- (25 +75 ) ->40 per cent otherwise fail.
- Waiting for my results hope i will clear.
FINAL EXAM REVIEW
- I have only received 10 assignment questions, so don’t trust your faculty if they say to study only assignment questions like that.
- I had questions from the assignment questions, especially on roles, conflict management, introduction to project management, and many more easy questions.
DRAWBACKS IN COURSE(PM) AND EXAM CENTER (JNN)
Here’s the corrected version of your sentences:
- Just PPT teaching, no interaction in the course.
- No proper replies from teaching assistants.
- JNN College is far for Thiruvallur people, even for those from Thiruvallur district. Very poor allocation by NPTEL, to say the least.
The points mentioned above are truthful.
ALL THE BEST
Please Login to comment...
Similar reads.
- Competitve Exam Experiences
- Course Review
- Write It Up 2024
- Experiences
IMAGES
VIDEO
COMMENTS
NPTEL Programming In Java Week 7 Assignment Solution.I'll upload all assignment solutions So stay tuned to my channel.TEXT FORMAT- https://github.com/AyushTa...
Programming in Java NPTEL Week 7 Programming Assignment 1 Solutions. Complete the following code fragment to read three integer values from the keyboard and find the sum of the values.Declare a variable "sum" of type int and store the result in it. // Write the appropriate statement(s) to import the package(s) you need in your program import java.util.*; public class Question1{ public ...
02/07/2020 Programming in Java - Course https://onlinecourses.nptel.ac.in/noc20_cs08/progassignment?name=148 3/3 DOWNLOAD VIDEOS Assignment Solution
These are NPTEL Programming In Java Week 7 Assignment 7 Answers. Question 5. Complete the code segment to catch the exception in the following, if any. 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".
March 4, 2023. Faheem Ahmad. NPTEL Programming in Java Week 7 All Programming Assignment Solutions - Jan 2023 | Swayam. With the growth of Information and Communication Technology, there is a need to develop large and complex software. Further, those software should be platform independent, Internet enabled, easy to modify, secure, and robust.
đ Programming In Java NPTEL Elective Course 2023 | GATE NPTEL | https://techiestalk.in/NPTEL Programming In Java WEEK7 Programming Assignment Solutions | Sw...
Programming In Java Week 7 Assignment 7 Answers Solution Quiz | 2023-JulyJoin NPTEL - Programming in Java :https://telegram.me/ProgrammingInJavaNPTELJoin our...
Programming In Java - Assignment- 7,8,9,10 & 11 Solution Released Dear Participants, The Assignment-7,8,9,10 & 11 of Week- 7,8,9,10 & 11 Solution for the course "Programming In Java" has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum.
Java Week 6:Q2 In the following program, a thread class ThreadRun is created using the Runnable interface which prints "Thread using Runnable interface". Complete the main class to create a thread object of the class ThreadRun and run the thread, Java Week 6:Q3 A part of the Java program is given, which can be completed in many ways, for example using the concept of thread, etc. Follow the ...
Week 1: Overview of Object-Oriented Programming and Java. Programming Assignment. Week 2: Java Programming Elements. Programming Assignment. Week 3: Input-Output Handling in Java. Programming Assignment. Week 4: Encapsulation. Programming Assignment. Week 5: Inheritance.
Java Week 7: Q4 The following program reads a string from the keyboard and is stored in the String variable "s1". You have to complete the program so that it should should print the number of vowels in s1 .
NPTEL Programming in Java Week 7 All Programming Assignment Solutions || August 2020 || SwayamWith the growth of Information and Communication Technology, t...
NPTEL: Exam Registration date is extended for 12 week courses of Jan 2024! ... Week 08: Assignment 08 Solution: ... Programming In Java - Week 7 Feedback Form Dear Learners, Thank you for enrolling in this NPTEL course and we hope you have gone through the contents for this week and also attempted the assignment. We value your feedback and wish ...
02/07/2020 Programming in Java - - Unit 9 - Week 7 : https://onlinecourses.nptel.ac.in/noc20_cs08/unit?unit=8&assessment=99 3/5 Live Interactive
NPTEL Programming In Java Assignment 7 Answers:-. Q1. Complete the following code fragment to read three integer values from the keyboard and find the sum of the values. Declare a variable "sum" of type int and store the result in it. public class Question1{. public static void main (String[] args){. int i,number=0,sum=0;
NPTEL Java Assignment week 7. With the growth of Information and Communication Technology, there is a need to develop large and complex software. To meet this requirement object-oriented paradigm has been developed and based on this paradigm the Java programming language emerges as the best programming environment.
đ Programming In Java NPTEL Elective Course 2023đProgramming Assignment Link : https://bit.ly/3kG26bXNPTEL Programming In Java WEEK 7 Quiz Assignment Solut...
"Programming In Java" - Assignment-7, Solution Released Dear Participants, The Solutions of the Assignment - 7 under Week - 7 for the course "Programming In Java" has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum.
NPTEL Programming in Java Week 7 Programming Assignment 7 Solution. Q1) A byte char array is initialized. You have to enter an index value"n". According to index your program will print the byte and its corresponding char value. Complete the code segment to catch the exception in the following, if any.
September 5, 2023. Faheem Ahmad. NPTEL Programming in Java Week7 All Programming Assignment Solutions - July 2023 | Swayam. With the growth of Information and Communication Technology, there is a need to develop large and complex software. Further, those software should be platform independent, Internet enabled, easy to modify, secure, and ...
Programming In Java Week 7 Programming Assignment Answers Solution Quiz | 2023-JulyJoin our Telegram Channel : https://telegram.me/SwayamSolverFor unproctore...
Answer : a , b, d. Week 7 : Programming Assignment 1. 1] A byte char array is initialized. You have to enter an index value"n". According to index your program will print the byte and its corresponding char value. Complete the code segment to catch the exception in the following, if any.
Java. Java Programming Language. Java Tutorial; Data Types; Variables; Operators. Operators in Java; ... NPTEL Full Form is called as "National Programme on Technology Enhanced Learning " founded by 7 IIT And 1 IISC for Quality Course Contents. ... ASSIGNMENT VALUATION : Since it is an 8-week course best of 6 will be calculated for the exam ...