3188405470

3188405470



DESIGN AND ANALYSIS OF ALGOR1THM LABORA IORY (I5CSL47)

CHETHAN RAJ C Asistant Profcssor in CSE Dcpt

// Ali Programs are Verified by using the platform Ubuntu 16.04 vcrsion.

l)a Create a Java class called Student with the following details as variables within it.

(i)    USN

(ii)    Nanic

(iii)    Branch

(iv)    Phone

Write a Java program to create nStudent objects and print the USN, Na me, Branch, and Phone of these objects wilh suitable headings.*/

import java.util.Scanner; class SCudentDetails {

String USN, Name, Branch, Phone;

Scanner input = new Scanner(System.in); void rcad()

{

Sysiem.out.printlnCEnter the Student Details\n"); Syslem.out.prinllnCEnler USN”);

USN = input.nextLine(); System.ouLprintln("Entcr Name");

Name = input. nextLme(); System.out.prinllnCEnter Branch");

Branch = input.nextLine(); System.out.priniln("Entcr Phone");

Phone = input.nextLine();


.O

V


<Ś>


&


void displayO

i

System.out.printf("%-20s %-20s %-20s %-20s", USN, Name. Branch, Phone);

: class Student 1 public static void main(String[] args)

Scanner input = new Scanner(System.in);

System.out.printlnCEnter number of student details to be created"); int number = inpul.ncxtlnt();

Student s[] = new Student [number];

// Read student details into array of student objects for (int i = 0; i < number; i++)

Che tli a n Raj C, Asst Professor Dept. of CSE Page 1



Wyszukiwarka

Podobne podstrony:
DESIGN AND PERFORMANCE OF SCREW PILES AND HELICAL ANCHORS IN SOILS (A Bibliography of the Techn
In addition, this legał or nalural person may request advice on the design and conduct of pharmacovi
Literatura Literatura obowiązkowa: Phillip A. Laplante, “Real-Time Systems Design and Analysis”, 3rd
PEK_U02 Student can use codes conversion systems. PEK_U03 Student can design and use of registers. P
POSTER SESSION, H20NEW INTENSITY MEASUREMENTS AND ANALYSIS OF THE IN-FRARED SPECTRUM OF METHANE IN T
66 Projekt oraz implementacja rozproszonego brokera sieciowego. The design and implementation of the
98 Projekt i implementacja systemu wspierającego pracę biura podróży. Design and implementation
6 Spis treści - the results and analysis of the survey (Wpływ wykorzystania źródeł finansowania celo
of organization and management of industrial laboratories - Chemical, biochemical and
Chemical Technology: food chemistry, food enginecring, technoiogy and food analysis, chemistry and a
DSC03425 Bernard Leupen i inni. Design and Analysis Innymi słowy proces projektowy składa się z nast
Saccharomyces cerevisiae. (Isolation and analysis of multicopy suppressors of mdp/rsp5 mutation of t
DSC03424(1) Bernard Leupen i inni: Design and Analysis Wszystkie związane z tematem projektu istotne
DESIGN AND DEVELOPMENT OF A TRAPEZOIDAL PERMANENT MAGNET SYNCHRONOUS MACHINĘ EMULATORFranęois LESSAR

więcej podobnych podstron