NPTEL PROGRAMMING ASSIGNMENTS
Week 12 : Programming Assignment 1
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 doubleto 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:
okhid
Output_1:
100.0
Input_2:
ia
Output_2:
2.0
Week 12 : Programming Assignment 2
Week 12 : Programming Assignment 3
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:
ram
das
123
25.5
24.5
output:
ramdas 123 25.0
Week 12 : Programming Assignment 4
Week 12 : Programming Assignment 5