Programming In Java Assignment 1 Answers 2022 | Week 1 Answers: QUIZXP

Programming In Java Assignment 1

Are you looking for the Answers to NPTEL Programming In Java Assignment 1? This article will help you with the answer to the National Programme on Technology Enhanced Learning (NPTEL) Course Programming In Java Assignment 1

What is Programming In Java?

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.

CRITERIA TO GET A CERTIFICATE

Average assignment score = 25% of the average of best 8 assignments out of the total 12 assignments given in the course.
Exam score = 75% of the proctored certification exam score out of 100

Final score = Average assignment score + Exam score

YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF THE AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. If one of the 2 criteria is not met, you will not get the certificate even if the Final score >= 40/100.

Below you can find the answers for Programming In Java Assignment 1

Assignment No.Answers
Programming In Java Assignment 1 Click Here
Programming In Java Assignment 2 Click Here
Programming In Java Assignment 3 Click Here
Programming In Java Assignment 4 Click Here
Programming In Java Assignment 5 Click Here
Programming In Java Assignment 6 Click Here
Programming In Java Assignment 7 Click Here
Programming In Java Assignment 8 Click Here

Programming In Java Assignment 1 Answers:-

Q1. Complete the code segment to find the perimeter and area of a circle given a value of radius.

You should use Math.PI constant in your program. If radius is zero or less than zero then print ” please enter non zero positive number “.

 System.out.println(2*Math.PI*radius);
 System.out.print(radius*Math.PI*radius);

Q2. Complete the code segment to find the largest among three numbers x,y, and z. You should use if-then-else construct in Java.

if (x>y && x>z)
System.out.print(x);
else if (y>x && y>z)
System.out.print(y);
  else
  System.out.println(z);

???? Next Week Answers: Assignment 02 ????

quizxp telegram

Q3. Consider First n even numbers starting from zero(0).Complete the code segment to calculate sum of  all the numbers divisible by 3 from 0 to n. Print the sum.

int a=-2;
for(int i=0;i<n;i++)
{
  a=a+2;
  if(a%3==0)
    sum+=a;
}

System.out.print(sum);

Q4. Complete the code segment to check whether the number is an Armstrong number or not.

Armstrong Number:

A positive number is called an Armstrong number if it is equal to the sum of cubes of its digits for example 153 = 13+53+33, 370, 371, 407, etc.

int num=n;
while(num>0)
{
  int r=num%10;
  result+=r*r*r;
  num/=10;
}

if (result==n)
  System.out.print(1);
else
  System.out.print(0);

Q5. Complete the code segment to help Ragav , find the highest mark and average mark secured by him in “s” number of subjects.

int sum=0,max=0;
for(int i1=0;i1<arr.length;i1++)
{
  if(arr[i1]>max)
    max=arr[i1];
  sum+=arr[i1];
}
mark_avg=sum/arr.length;
System.out.println(max);
System.out.print(mark_avg);

For other courses answers:- Visit

For Internship and job updates:- Visit