- Notifications
You must be signed in to change notification settings - Fork2
I am sharing my journey of studying a course on Programming in Java taught by Prof.Debasis Samanta Sir IIT Kharagpur
omunite215/NPTEL-Programming-in-Java-Ultimate-Guide
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
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.
Note the following points carefully:1. Use only double datatype to store all numeric values.2. Each button on the calculator should be operated by typing the characters from 'a' to 't'.3. You may use the already defined function gui_map(char).4. Use predefined methods from java.lang.Math class wherever applicable.5. Without '=' binary operations won't give output as shown in Input_3 and Output_3 example below.5. The calculator should be able to perform required operations on one or two operands as shown in the below example:Input_1: okhidOutput_1:100.0Input_2: iaOutput_2:2.0Input_3: okhiOutput_3: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.
For example:https://www.xyz.com:1080/index.htmprotocol://host:port/filenameJava 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
"name rollnumber avgmark".For example:input:ramdas12325.524.5output:ramdas 123 25.0Java 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
" int sum_odd_n(int n) ".For example :input : 5output: 25 input : 6output : 36About
I am sharing my journey of studying a course on Programming in Java taught by Prof.Debasis Samanta Sir IIT Kharagpur
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.