0% found this document useful (0 votes)
32 views4 pages

Programming Paradigms Laboratory: Faculty of Engineering & Technology

This document contains instructions for a programming paradigms laboratory assignment involving one dimensional arrays. Students are asked to (1) develop a Java program to delete duplicate elements from an array, and (2) develop a GradeBook class with instance variables for course name and student grades, and methods to calculate class statistics and display a grade report. The document provides sample code to remove duplicate elements from an array.

Uploaded by

ramu Yarru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views4 pages

Programming Paradigms Laboratory: Faculty of Engineering & Technology

This document contains instructions for a programming paradigms laboratory assignment involving one dimensional arrays. Students are asked to (1) develop a Java program to delete duplicate elements from an array, and (2) develop a GradeBook class with instance variables for course name and student grades, and methods to calculate class statistics and display a grade report. The document provides sample code to remove duplicate elements from an array.

Uploaded by

ramu Yarru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Programming Paradigms Laboratory

B.Tech.

Name :
Roll Number :
Department : Computer Science and Engineering

Faculty of Engineering & Technology


Ramaiah University of Applied Sciences

Faculty Engineering & Technology


Programme B. Tech. in Computer Science and Engineering
Year/Semester 2nd Year / 4th Semester
Name of the Laboratory Programming Paradigms Laboratory
Laboratory Code 19CSL217A
Laboratory 3
Title of the Laboratory Exercise: One dimensional arrays
1. Questions

a. Develop a Java program to delete the duplicate elements from an array.


b. Develop a GradeBook class with an instance variables string course name and array of grades
that instructors can use to maintain students’ grades on an exam and display a grade report that
includes the grades, class average, lowest grade and highest grade.

2. Calculations/Computations/Algorithms

Code 1:

package removeduplicate;

import java.util.Scanner;

public class RemoveDuplicate {

public static void main(String[] args) {


int len,b,d;
System.out.println("/n Enter size of array.");
Scanner z = new Scanner(System.in);
len= z.nextInt();
int arr[]=new int[len];
d=len;
int c=0,f;
for(int i=0;i<len;i++)
{
System.out.println("/n ENter no.");
b=z.nextInt();
f=0;
for(int j=0;j<len;j++)
{
if(arr[j]==b)
{
f=1;
d--;
}
}
if(f==0)
{

arr[c]=b;
c++;
}
}
for(int i=0;i<d;i++)
{
System.out.println("\n "+arr[i]);
}

3. Presentation of Results

Outpur 1:
4. Conclusions

5. Limitations of Experiments and Results

You might also like