SlideShare a Scribd company logo
1 of 28
Download to read offline
Java Programming
(Assignment โ€“I)
Submitted in partial fulfilment of the requirements for the degree of
Post Graduate Diploma in Information Technology
by
Vijayananda D Mohire
(Registration No.200508208)
Information Technology Department
Symbiosis Bhavan,
1065 B, Gokhale Cross
Road, Model Colony, Pune โ€“ 411016,
Maharashtra, India
(2007)
2
3
Java Programming
4
Table of Contents
QUESTION 1 ......................................................................................................................................................................... 6
ANSWER 1 ............................................................................................................................................................................ 6
QUESTION 2 ......................................................................................................................................................................... 8
ANSWER 2 ............................................................................................................................................................................ 8
QUESTION 3 .......................................................................................................................................................................10
ANSWER 3 ..........................................................................................................................................................................10
QUESTION 4 .......................................................................................................................................................................12
ANSWER 4 ..........................................................................................................................................................................12
QUESTION 5 .......................................................................................................................................................................14
ANSWER 5 ..........................................................................................................................................................................14
QUESTION 6 .......................................................................................................................................................................16
ANSWER 6 ..........................................................................................................................................................................16
QUESTION 7 .......................................................................................................................................................................18
ANSWER 7 ..........................................................................................................................................................................18
QUESTION 8 .......................................................................................................................................................................20
ANSWER 8 ..........................................................................................................................................................................21
QUESTION 9 .......................................................................................................................................................................23
ANSWER 9 ..........................................................................................................................................................................24
QUESTION 10.....................................................................................................................................................................27
ANSWER 10........................................................................................................................................................................27
5
Java Programming
6
Question 1 Write a Java program that calculates and prints the simple interest
using the formula :
Simple Interest = PNR / 100
Input values P,N,R should be accepted as command line input as below.
e.g. java SimpleInterest 5 10 15
Answer 1
Code:
package Interest_Pkg;
/**
* Define Interest class
* @author Vijayananda D Mohire
*
*/
public class Interest {
/** Creates a new instance of Interest, default constructor */
public Interest() {
}
/**
* Main function for entry point of the project
* @param args the command line arguments
*
*/
public static void main(String[] args) {
// Declare and initialize the P,N,R and SI variables
double P=0;
double N=0;
double R =0;
double SI = 0;
// Check for the presence of Console input args
if (args.length > 0) {
try {
// Read the Console inputs and convert them to double data type
P = Integer.parseInt(args[0]);
7
N = Integer.parseInt(args[1]);
R = Integer.parseInt(args[2]);
}
// wrap the above code in a try catch block
catch (NumberFormatException e)
{
// For any Number Format exception caught, throw an error
System.err.println("Argument must be an integer");
// Quit application with status code 1
System.exit(1);
}
}
// Print the values of Principal, Tenure and Rate of Interest
System.out.println(P);
System.out.println(N);
System.out.println(R);
// Calculate the Simple Interest using the formula
SI = (P*N*R)/100;
// Print the Simple Interest earned
System.out.print("The interest earned is $");
System.out.println(SI);
}
}
Results:
8
Evaluatorโ€Ÿs Comments if any:
Question 2 Write a program to compute sum of digits of a given number.
(Hint: Separate digits one by one from the number and then add)
Answer 2
package SumofDigits_Pkg;
/**
* Define SumofDigits class
* @author Vijayananda D Mohire
*/
public class SumofDigits {
/** Creates a new instance of SumofDigits, default constructor */
public SumofDigits() {
}
/**
* Main function for entry point of the project
* @param args the command line arguments
*/
public static void main(String[] args) {
// Declare and initialize the variables
int Number = 0;
int N =0;
int sum = 0;
int digit =0;
// Check for the presence of Console input args
if (args.length > 0) {
9
try {
// Read the Console inputs and convert them to integer data type
Number = Integer.parseInt(args[0]);
// wrap the above code in a try catch block
} catch (NumberFormatException e) {
// For any Number Format exception caught, throw an error
System.err.println("Argument must be an integer");
// Quit application with status code 1
System.exit(1);
}
}
// If entered number is negative, negate the symbol to make it positive
N = Number;
if (N<0) N = -N;
sum=0;
// loop and sum the digits, use modulos operator to isolate each digit
while (N!=0) {
digit = N % 10;
sum = sum + digit;
N = N / 10;
}
// Print the value of Sum of the digits obtained above
System.out.print("The sum of digits is :");
System.out.println(sum);
}
}
Results:
Evaluatorโ€Ÿs Comments if any:
10
Question 3 The numbers in the following sequence are called the fibonacci
numbers . 0 , 1 , 1 , 2, 3 , 5 , 8 , 13 , โ€ฆโ€ฆโ€ฆโ€ฆ..
Write a program using doโ€ฆ..while loop to calculate and print the first m Fibonacci
numbers.
(Hint : After the first two numbers in the series, each number is the sum of
preceding two numbers.)
Answer 3
Code:
package Fibonacci_Pkg;
/**
* Define Fibonacci class
* @author Vijayananda D Mohire
*/
/**
*
* Creates a new instance of Fibonacci, default constructor
*/
public class fibonacci {
/** Creates a new instance of fibonacci */
public fibonacci() {
}
/**
* Main function for entry point of the project
* @param args the command line arguments
*/
public static void main(String[] args) {
// Declare and initialize the variables
int n0 = 0, n1 = 1 , n2 = 0;
int M = 0;
11
// Check for the presence of Console input args
if (args.length > 0) {
try {
// Read the Console inputs and convert them to integer data type
M = Integer.parseInt(args[0]);
// wrap the above code in a try catch block
} catch (NumberFormatException e) {
// For any Number Format exception caught, throw an error
System.err.println("Argument must be an integer");
// Quit application with status code 1
System.exit(1);
}
}
// Print the first two default values of the series
System.out.print(n0 + "," + n1 + ",");
// Loop and add the two numbers to get next number
for ( int i = 0; i < M-2; i++) {
n2 = n1 + n0;
// Print next number in the series
System.out.print(n2 + ",");
// Swap the previous and next numbers
n0= n1;
n1= n2;
}
System.out.println();
}
}
Results:
12
Question 4 Write a program that converts a decimal number to Roman number.
Decimal Number is accepted as command line input at the time of execution.
Answer 4
Code:
package RomanNumerals_Pkg;
/**
* Define RomanNumerals class
* @author Vijayananda D Mohire
*/
public class RomanNumerals {
/** Creates a new instance of RomanNumerals */
public RomanNumerals() {
}
/**
* Main function for entry point of the project
* @param args the command line arguments
*/
public static void main(String[] args) {
// Declare and initialize the ROMAN variables
char numerals[] = {'I', 'V', 'X', 'L', 'C', 'D', 'M'};
StringBuffer s = new StringBuffer();
char c1, c2, c3;
int j;
// Check for the presence of Console input args
char[] decimal = args[0].toCharArray();
// Loop until length of the input Number
for(int i = 0; i < decimal.length; i++) {
j = (decimal.length - i - 1) * 2;
13
// Assign Roman values based on the Units, Tenth and Hunderedth postion of the
Number
c1 = numerals[j];
c2 = j + 1 < numerals.length ? numerals[j + 1] : ' ';
c3 = j + 2 < numerals.length ? numerals[j + 2] : ' ';
// Built the Roman number by appending it with equivalent Roman digit like I, V
etc..
switch(decimal[i]) {
case '1' : s = s.append(c1); break;
case '2' : s = s.append(c1).append(c1); break;
case '3' : s = s.append(c1).append(c1).append(c1); break;
case '4' : s = s.append(c1).append(c2); break;
case '5' : s = s.append(c2); break;
case '6' : s = s.append(c2).append(c1); break;
case '7' : s = s.append(c2).append(c1).append(c1); break;
case '8' : s = s.append(c2).append(c1).append(c1).append(c1); break;
case '9' : s = s.append(c1).append(c3);
}
}
// Print the completly built number as above
System.out.println(s);
}
}
Results:
14
Question 5 Write a program that prints prime numbers between 1 to n. Number
n should be accepted as command line input.
Answer 5
Code:
package PrimeNum_Pkg;
/**
* Define Primes class
* @author Vijayananda D Mohire
*/
public class Primes {
/** The default stopping point for primes */
public static final long DEFAULT_STOP = 4294967295L;
/** The first prime number */
public static final int FP = 2;
/**
* Set the Maximim Size limit
*/
static int MAX = 10000;
/** Creates a new instance of Primes */
public Primes() {
}
/**
* * Main function for entry point of the project
* @param args the command line arguments
*/
public static void main(String[] args) {
// Declare and initialize the variables
long[] prime = new long[MAX];
long stop = DEFAULT_STOP;
15
// Check for the presence of Console input args
if (args.length == 1) {
stop = Long.parseLong(args[0]);
}
prime[1] = FP; // P1 (ignore prime[0])
long n = FP+1; // odd candidates
int j = 1; // numberFound
boolean isPrime = true; // for 3
do {
if (isPrime) {
if (j == MAX-1) {
// Grow array dynamically if needed
long[] np = new long[MAX * 2];
System.arraycopy(prime, 0, np, 0, MAX);
MAX *= 2;
prime = np;
}
prime[++j] = n; // P2
isPrime = false;
}
n += 2; // P4
for (int k = 2; k <= j && k < MAX; k++) { // P5, P6, P8
long q = n / prime[k];
long r = n % prime[k];
if (r == 0) {
break;
}
if (q <= prime[k]) { // P7
isPrime = true;
break;
}
}
} while (n < stop); // P3
// Print the completly Prime number list
16
for (int i=1; i<=j; i++)
System.out.println(prime[i]);
}
}
Results:
Question 6 Write a program to print the following output using the for loop.
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
Answer 6
Code:
package Triangle_Pkg;
/**
* Define Triangle class
* @author Vijayananda D Mohire
17
*/
public class Triangle {
/** Creates a new instance of Triangle */
public Triangle() {
}
/**
* Main function for entry point of the project
* @param args the command line arguments
*/
public static void main(String[] args) {
// Declare and initialize the variables
int num =0;
if (args.length == 1)
num = Integer.parseInt(args[0]);
else
System.out.println("Please enter a Number");
// Outer loop for new line increment
for(int i=1;i<=num;i++){
// Inner loop for number of times to print on each line
for(int j=1;j<=i;j++){
// Print the incremented Number
System.out.print(" "+i+" ");
}
// Print new line
System.out.print("n");
}
}
}
18
Results:
Question 7 Write a program to find the Factorial of a number using Recursion.
Factorial can be defined as Factorial(n) = 1 * 2 * 3 โ€ฆ.* (n-1) * n.
Answer 7
Code:
package Factorial_Pkg;
/**
* Define Triangle class
* @author Vijayananda D Mohire
*/
import java.io.Console;
/**
* Define Factorial class
* @author Vijayananda D Mohire
*/
public class Factorial {
/** Creates a new instance of Factorial */
public Factorial() {
}
/**
19
* Main function for entry point of the project
* @param args the command line arguments
*/
public static void main(String[] args) {
// Declare and initialize the variables
int num =0;
String input;
// Check for Input
if (args.length > 0) {
try {
num = Integer.parseInt(args[0]);
}
// Catch error and display the error
catch (NumberFormatException e) {
System.err.println("Argument must be an integer");
System.exit(1);
}
}
// Loop until Number is greater than 0
while (num >= 0)
{
//Call the Recursive function and print the return value
System.out.print("n" + num + "! = " + factorial (num));
System.out.print("nEnter a number (Less than 0 to stop): ");
// Prompt for user to confirm to continue or Quit
try {
Console console = System.console();
input = console.readLine("Quit? ");
num = Integer.parseInt( input );
}
catch (Exception e) {
System.err.println("Argument must be an integer");
}
}
20
// Come put of loop if user Quits by entering negative number
System.out.println("good bye!");
} // main method
/**
* Recursive factorial function
* @param n long Recursive factorial function input
* @return long number
*/
public static long factorial (long n)
{
// Return default value for number less than 2
if (n < 2)
return 1;
// self call and return value after multiplying n and n-1
return n * factorial(n - 1);
}
}
Results:
Question 8 Define an exception called โ€œNoMatchExceptionโ€ that is thrown when
a string is not equal to โ€œSymbiosisโ€. Write a Java program that uses this
exception.
21
Answer 8
Code:
package CustomException_Pkg;
import java.io.*;
/**
* Define CustomException class
* @author Vijayananda D Mohire
*/
public class CustomException {
/**
* Define variable
* */
static String s = "";
/**
* Main function for entry point of the project
* @param args the command line arguments
*/
public static void main (String args[])
{
// Declare and initialize the variables for reading the input
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader buf = new BufferedReader(is);
System.out.println("Enter the word to spell match with Symbiosis: ");
// try - catch to read the input line
try
{
s = buf.readLine();
}
catch (IOException e)
{
System.out.println("IOException was " + e.getMessage());
}
// try - catch uses NoMatchException
try
22
{
checkSpelling(); // this method uses NoMatchException
}
catch (NoMatchException se) // but it is caught here
{
System.out.println("Spell exception was: " + se.getError());
}
} // end main
/**
* Check spelling of typed in word. Throw exception if wrong.
* @throws CustomException_Pkg.NoMatchException Throws Exception if the
Synbol doesnot match string "Symbiosis"
*/
private static void checkSpelling() throws NoMatchException
{
if (s.equalsIgnoreCase("Symbiosis"))
System.out.println("OK, Spell matched");
else
throw new NoMatchException("Spell Match Error");
}
} // end main class
/**
* Custom exception class that descends from Java's Exception class.
*/
class NoMatchException extends Exception
{
/**
* Define string variable
* */
String mistake;
/**
* Default constructor - initializes instance variable to unknown
* */
public NoMatchException()
{
super(); // call superclass constructor
mistake = "unknown";
23
}
/**
* Constructor receives some kind of message that is saved in an instance variable.
* @param err Custom Error message
*/
public NoMatchException(String err)
{
super(err); // call super class constructor
mistake = err; // save message
}
/**
* public method, callable by exception catcher. It returns the error message.
* @return Returns error string
*/
public String getError()
{
return mistake;
}
}
Results:
Question 9 Write a program to create an applet with red back ground and
display the Message WELCOME TO THE WORLD OF APPLETS. Write its HTML
document also. Specify width and height to the Applet.
24
Answer 9
Code:
package WelcomeApplet_Pkg;
import java.applet.Applet;
import java.awt.*;
/**
* Define WelcomeApplet class
* @author Vijayananda D Mohire
*/
public class WelcomeApplet extends java.applet.Applet {
/** Initialization method that will be called after the applet is loaded
* into the browser.
*/
public void init() {
setBackground( Color.RED ); // change here the applet window color
}
/** Start method that will be called at the begining.
*/
public void start(){
System.out.println("Applet starting.");
}
/** Stop method that will be called at the end.
*/
public void stop(){
System.out.println("Applet stopping.");
}
/** Destroy method that will be called at the last.
*/
public void destroy(){
System.out.println("Destroy method called.");
}
/**
25
* Paint method that use Graphics to initiaize the required Font and Color
* @param g Graphics variable
*/
public void paint(Graphics g) {
Font font1 = new Font( "Courier", Font.BOLD, 36 );
g.setFont( font1 );
g.setColor( Color.WHITE );
g.drawString( "WELCOME TO THE WORLD OF APPLETS.!", 50, 25 );
}
}
----------------WelcomeApplet_Html------------------------------
<HTML>
<HEAD>
<TITLE>Applet HTML Page</TITLE>
</HEAD>
<BODY>
<H3><HR WIDTH="100%">Applet HTML Page<HR WIDTH="100%"></H3>
<P>
<APPLET codebase="classes" code="WelcomeApplet_Pkg/WelcomeApplet.class"
width=500 height=200></APPLET>
</P>
<HR WIDTH="100%"><FONT SIZE=-1><I>Generated by NetBeans IDE</I></FONT>
</BODY>
</HTML>
Results:
Cmd line
26
Applet Viewer:
27
Question 10 Write a program that detects successive repeated occurrence of a
letter in a word. For example, in the word โ€œexplanationโ€ letter โ€žaโ€Ÿ and โ€žnโ€Ÿ occurs
twice.
Answer 10
Code:
package repeatedletters;
import java.util.*;
import java.io.*;
/**
* Define RepLetter class
* @author Vijayananda D Mohire
*/
public class RepLetter {
/**
* Main function for entry point of the project
* @param args the command line arguments
* @throws java.io.IOException Throws IO Exception
*/
public static void main(String[] args) throws IOException
{
// Use Buffered read
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.print("Please Enter aString ");
System.out.println();
String str=br.readLine();
// Convert input String to Char array
char[]buffer =str.toCharArray();
//Loop for buffer length
for(int counter =0;counter<buffer.length;counter++)
{ char letter= buffer[counter];
28
int flage=0;
for ( int i=0; i<buffer.length; i++)
{
if (letter==buffer[i])
// if letter repeation is found increment flag
flage++;
}
if(counter==0)
{
// Type the occurance
System.out.println("The letter ="+letter+" is repeated "+flage+" No of Times ");
continue;
}
boolean flag=false;
for(int j=counter-1;j>=0;j--)
{
if(letter==buffer[j])
flag=true;
}
if(!flag)
{
System.out.println("The letter ="+letter+" is repeated "+flage+" No of Times ");
} } } }
Results:

More Related Content

What's hot

Data Storage In Android
Data Storage In Android Data Storage In Android
Data Storage In Android Aakash Ugale
ย 
Study of Network Devices
Study of Network DevicesStudy of Network Devices
Study of Network DevicesSM. Aurnob
ย 
JAVA GUI PART I
JAVA GUI PART IJAVA GUI PART I
JAVA GUI PART IOXUS 20
ย 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedureDhaval Kaneria
ย 
Shared preferences
Shared preferencesShared preferences
Shared preferencesSourabh Sahu
ย 
SQLITE Android
SQLITE AndroidSQLITE Android
SQLITE AndroidSourabh Sahu
ย 
Android Thread
Android ThreadAndroid Thread
Android ThreadCharile Tsai
ย 
Multithreading in java
Multithreading in javaMultithreading in java
Multithreading in javaRaghu nath
ย 
Java management extensions (jmx)
Java management extensions (jmx)Java management extensions (jmx)
Java management extensions (jmx)Tarun Telang
ย 
Linux Advantages and Disadvantages
Linux Advantages and DisadvantagesLinux Advantages and Disadvantages
Linux Advantages and DisadvantagesSHUBHA CHATURVEDI
ย 
Voice Over IP (VoIP)
Voice Over IP (VoIP)Voice Over IP (VoIP)
Voice Over IP (VoIP)habib_786
ย 
Linux architecture
Linux architectureLinux architecture
Linux architecturemcganesh
ย 
CNIT 128 Ch 2: Hacking the cellular network
CNIT 128 Ch 2: Hacking the cellular networkCNIT 128 Ch 2: Hacking the cellular network
CNIT 128 Ch 2: Hacking the cellular networkSam Bowne
ย 
PowerShell-1
PowerShell-1PowerShell-1
PowerShell-1Saravanan G
ย 
Introduction To CodeIgniter
Introduction To CodeIgniterIntroduction To CodeIgniter
Introduction To CodeIgniterschwebbie
ย 
Monkey talk
Monkey talkMonkey talk
Monkey talkConfiz
ย 
Packages in java
Packages in javaPackages in java
Packages in javaJerlin Sundari
ย 

What's hot (20)

Data Storage In Android
Data Storage In Android Data Storage In Android
Data Storage In Android
ย 
Study of Network Devices
Study of Network DevicesStudy of Network Devices
Study of Network Devices
ย 
Firewall
FirewallFirewall
Firewall
ย 
Dhcp ppt
Dhcp pptDhcp ppt
Dhcp ppt
ย 
JAVA GUI PART I
JAVA GUI PART IJAVA GUI PART I
JAVA GUI PART I
ย 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
ย 
Shared preferences
Shared preferencesShared preferences
Shared preferences
ย 
SQLITE Android
SQLITE AndroidSQLITE Android
SQLITE Android
ย 
Android Thread
Android ThreadAndroid Thread
Android Thread
ย 
Multithreading in java
Multithreading in javaMultithreading in java
Multithreading in java
ย 
Java management extensions (jmx)
Java management extensions (jmx)Java management extensions (jmx)
Java management extensions (jmx)
ย 
Linux Advantages and Disadvantages
Linux Advantages and DisadvantagesLinux Advantages and Disadvantages
Linux Advantages and Disadvantages
ย 
Android adapters
Android adaptersAndroid adapters
Android adapters
ย 
Voice Over IP (VoIP)
Voice Over IP (VoIP)Voice Over IP (VoIP)
Voice Over IP (VoIP)
ย 
Linux architecture
Linux architectureLinux architecture
Linux architecture
ย 
CNIT 128 Ch 2: Hacking the cellular network
CNIT 128 Ch 2: Hacking the cellular networkCNIT 128 Ch 2: Hacking the cellular network
CNIT 128 Ch 2: Hacking the cellular network
ย 
PowerShell-1
PowerShell-1PowerShell-1
PowerShell-1
ย 
Introduction To CodeIgniter
Introduction To CodeIgniterIntroduction To CodeIgniter
Introduction To CodeIgniter
ย 
Monkey talk
Monkey talkMonkey talk
Monkey talk
ย 
Packages in java
Packages in javaPackages in java
Packages in java
ย 

Similar to Java Programming Assignment

Java Programming Projects
Java Programming ProjectsJava Programming Projects
Java Programming ProjectsVijayananda Mohire
ย 
java program assigment -1
java program assigment -1java program assigment -1
java program assigment -1Ankit Gupta
ย 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.Erika Susan Villcas
ย 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.Erika Susan Villcas
ย 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.Erika Susan Villcas
ย 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.Erika Susan Villcas
ย 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.Erika Susan Villcas
ย 
can someone fix the errors in this code- the name needs to be Fraction.pdf
can someone fix the errors in this code- the name needs to be Fraction.pdfcan someone fix the errors in this code- the name needs to be Fraction.pdf
can someone fix the errors in this code- the name needs to be Fraction.pdfvinaythemodel
ย 
Computer Science CS Project Matrix CBSE Class 12th XII .pdf
Computer Science CS Project Matrix CBSE Class 12th XII .pdfComputer Science CS Project Matrix CBSE Class 12th XII .pdf
Computer Science CS Project Matrix CBSE Class 12th XII .pdfPranavAnil9
ย 
Object Oriented Technologies
Object Oriented TechnologiesObject Oriented Technologies
Object Oriented TechnologiesUmesh Nikam
ย 
Project 2Project 2.pdfIntroduction to Programming EECS 1.docx
Project 2Project 2.pdfIntroduction to Programming  EECS 1.docxProject 2Project 2.pdfIntroduction to Programming  EECS 1.docx
Project 2Project 2.pdfIntroduction to Programming EECS 1.docxwkyra78
ย 
Functions
FunctionsFunctions
FunctionsSwarup Boro
ย 
Java Practical File Diploma
Java Practical File DiplomaJava Practical File Diploma
Java Practical File Diplomamustkeem khan
ย 
System programmin practical file
System programmin practical fileSystem programmin practical file
System programmin practical fileAnkit Dixit
ย 
c++ practical Digvajiya collage Rajnandgaon
c++ practical  Digvajiya collage Rajnandgaonc++ practical  Digvajiya collage Rajnandgaon
c++ practical Digvajiya collage Rajnandgaonyash production
ย 
compiler design
compiler designcompiler design
compiler designIshwor2
ย 
Functions part1
Functions part1Functions part1
Functions part1yndaravind
ย 

Similar to Java Programming Assignment (20)

Java Programming Projects
Java Programming ProjectsJava Programming Projects
Java Programming Projects
ย 
java program assigment -1
java program assigment -1java program assigment -1
java program assigment -1
ย 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
ย 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
ย 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
ย 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
ย 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
ย 
can someone fix the errors in this code- the name needs to be Fraction.pdf
can someone fix the errors in this code- the name needs to be Fraction.pdfcan someone fix the errors in this code- the name needs to be Fraction.pdf
can someone fix the errors in this code- the name needs to be Fraction.pdf
ย 
Estructura secuencial -garcia
Estructura secuencial -garciaEstructura secuencial -garcia
Estructura secuencial -garcia
ย 
Trabajo
TrabajoTrabajo
Trabajo
ย 
Computer Science CS Project Matrix CBSE Class 12th XII .pdf
Computer Science CS Project Matrix CBSE Class 12th XII .pdfComputer Science CS Project Matrix CBSE Class 12th XII .pdf
Computer Science CS Project Matrix CBSE Class 12th XII .pdf
ย 
ADLAB.pdf
ADLAB.pdfADLAB.pdf
ADLAB.pdf
ย 
Object Oriented Technologies
Object Oriented TechnologiesObject Oriented Technologies
Object Oriented Technologies
ย 
Project 2Project 2.pdfIntroduction to Programming EECS 1.docx
Project 2Project 2.pdfIntroduction to Programming  EECS 1.docxProject 2Project 2.pdfIntroduction to Programming  EECS 1.docx
Project 2Project 2.pdfIntroduction to Programming EECS 1.docx
ย 
Functions
FunctionsFunctions
Functions
ย 
Java Practical File Diploma
Java Practical File DiplomaJava Practical File Diploma
Java Practical File Diploma
ย 
System programmin practical file
System programmin practical fileSystem programmin practical file
System programmin practical file
ย 
c++ practical Digvajiya collage Rajnandgaon
c++ practical  Digvajiya collage Rajnandgaonc++ practical  Digvajiya collage Rajnandgaon
c++ practical Digvajiya collage Rajnandgaon
ย 
compiler design
compiler designcompiler design
compiler design
ย 
Functions part1
Functions part1Functions part1
Functions part1
ย 

More from Vijayananda Mohire

NexGen Solutions for cloud platforms, powered by GenQAI
NexGen Solutions for cloud platforms, powered by GenQAINexGen Solutions for cloud platforms, powered by GenQAI
NexGen Solutions for cloud platforms, powered by GenQAIVijayananda Mohire
ย 
Certificate- Peer Review of Book Chapter on ML
Certificate- Peer Review of Book Chapter on MLCertificate- Peer Review of Book Chapter on ML
Certificate- Peer Review of Book Chapter on MLVijayananda Mohire
ย 
Key projects Data Science and Engineering
Key projects Data Science and EngineeringKey projects Data Science and Engineering
Key projects Data Science and EngineeringVijayananda Mohire
ย 
Key projects Data Science and Engineering
Key projects Data Science and EngineeringKey projects Data Science and Engineering
Key projects Data Science and EngineeringVijayananda Mohire
ย 
Bhadale IT Hub-Multi Cloud and Multi QAI
Bhadale IT Hub-Multi Cloud and Multi QAIBhadale IT Hub-Multi Cloud and Multi QAI
Bhadale IT Hub-Multi Cloud and Multi QAIVijayananda Mohire
ย 
My key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIMy key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIVijayananda Mohire
ย 
Azure Quantum Workspace for developing Q# based quantum circuits
Azure Quantum Workspace for developing Q# based quantum circuitsAzure Quantum Workspace for developing Q# based quantum circuits
Azure Quantum Workspace for developing Q# based quantum circuitsVijayananda Mohire
ย 
Key projects in AI, ML and Generative AI
Key projects in AI, ML and Generative AIKey projects in AI, ML and Generative AI
Key projects in AI, ML and Generative AIVijayananda Mohire
ย 
My Journey towards Artificial Intelligence
My Journey towards Artificial IntelligenceMy Journey towards Artificial Intelligence
My Journey towards Artificial IntelligenceVijayananda Mohire
ย 
Bhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for AgricultureBhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for AgricultureVijayananda Mohire
ย 
Bhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for AgricultureBhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for AgricultureVijayananda Mohire
ย 
Bhadale IT Intel and Azure Cloud Offerings
Bhadale IT Intel and Azure Cloud OfferingsBhadale IT Intel and Azure Cloud Offerings
Bhadale IT Intel and Azure Cloud OfferingsVijayananda Mohire
ย 
GitHub Copilot-vijaymohire
GitHub Copilot-vijaymohireGitHub Copilot-vijaymohire
GitHub Copilot-vijaymohireVijayananda Mohire
ย 
Practical ChatGPT From Use Cases to Prompt Engineering & Ethical Implications
Practical ChatGPT From Use Cases to Prompt Engineering & Ethical ImplicationsPractical ChatGPT From Use Cases to Prompt Engineering & Ethical Implications
Practical ChatGPT From Use Cases to Prompt Engineering & Ethical ImplicationsVijayananda Mohire
ย 
Cloud Infrastructure - Partner Delivery Accelerator (APAC)
Cloud Infrastructure - Partner Delivery Accelerator (APAC)Cloud Infrastructure - Partner Delivery Accelerator (APAC)
Cloud Infrastructure - Partner Delivery Accelerator (APAC)Vijayananda Mohire
ย 
Red Hat Sales Specialist - Red Hat Enterprise Linux
Red Hat Sales Specialist - Red Hat Enterprise LinuxRed Hat Sales Specialist - Red Hat Enterprise Linux
Red Hat Sales Specialist - Red Hat Enterprise LinuxVijayananda Mohire
ย 
RedHat_Transcript_Jan_2024
RedHat_Transcript_Jan_2024RedHat_Transcript_Jan_2024
RedHat_Transcript_Jan_2024Vijayananda Mohire
ย 
Generative AI Business Transformation
Generative AI Business TransformationGenerative AI Business Transformation
Generative AI Business TransformationVijayananda Mohire
ย 
Microsoft Learn Transcript Jan 2024- vijaymohire
Microsoft Learn Transcript Jan 2024- vijaymohireMicrosoft Learn Transcript Jan 2024- vijaymohire
Microsoft Learn Transcript Jan 2024- vijaymohireVijayananda Mohire
ย 
Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0
Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0
Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0Vijayananda Mohire
ย 

More from Vijayananda Mohire (20)

NexGen Solutions for cloud platforms, powered by GenQAI
NexGen Solutions for cloud platforms, powered by GenQAINexGen Solutions for cloud platforms, powered by GenQAI
NexGen Solutions for cloud platforms, powered by GenQAI
ย 
Certificate- Peer Review of Book Chapter on ML
Certificate- Peer Review of Book Chapter on MLCertificate- Peer Review of Book Chapter on ML
Certificate- Peer Review of Book Chapter on ML
ย 
Key projects Data Science and Engineering
Key projects Data Science and EngineeringKey projects Data Science and Engineering
Key projects Data Science and Engineering
ย 
Key projects Data Science and Engineering
Key projects Data Science and EngineeringKey projects Data Science and Engineering
Key projects Data Science and Engineering
ย 
Bhadale IT Hub-Multi Cloud and Multi QAI
Bhadale IT Hub-Multi Cloud and Multi QAIBhadale IT Hub-Multi Cloud and Multi QAI
Bhadale IT Hub-Multi Cloud and Multi QAI
ย 
My key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIMy key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAI
ย 
Azure Quantum Workspace for developing Q# based quantum circuits
Azure Quantum Workspace for developing Q# based quantum circuitsAzure Quantum Workspace for developing Q# based quantum circuits
Azure Quantum Workspace for developing Q# based quantum circuits
ย 
Key projects in AI, ML and Generative AI
Key projects in AI, ML and Generative AIKey projects in AI, ML and Generative AI
Key projects in AI, ML and Generative AI
ย 
My Journey towards Artificial Intelligence
My Journey towards Artificial IntelligenceMy Journey towards Artificial Intelligence
My Journey towards Artificial Intelligence
ย 
Bhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for AgricultureBhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for Agriculture
ย 
Bhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for AgricultureBhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for Agriculture
ย 
Bhadale IT Intel and Azure Cloud Offerings
Bhadale IT Intel and Azure Cloud OfferingsBhadale IT Intel and Azure Cloud Offerings
Bhadale IT Intel and Azure Cloud Offerings
ย 
GitHub Copilot-vijaymohire
GitHub Copilot-vijaymohireGitHub Copilot-vijaymohire
GitHub Copilot-vijaymohire
ย 
Practical ChatGPT From Use Cases to Prompt Engineering & Ethical Implications
Practical ChatGPT From Use Cases to Prompt Engineering & Ethical ImplicationsPractical ChatGPT From Use Cases to Prompt Engineering & Ethical Implications
Practical ChatGPT From Use Cases to Prompt Engineering & Ethical Implications
ย 
Cloud Infrastructure - Partner Delivery Accelerator (APAC)
Cloud Infrastructure - Partner Delivery Accelerator (APAC)Cloud Infrastructure - Partner Delivery Accelerator (APAC)
Cloud Infrastructure - Partner Delivery Accelerator (APAC)
ย 
Red Hat Sales Specialist - Red Hat Enterprise Linux
Red Hat Sales Specialist - Red Hat Enterprise LinuxRed Hat Sales Specialist - Red Hat Enterprise Linux
Red Hat Sales Specialist - Red Hat Enterprise Linux
ย 
RedHat_Transcript_Jan_2024
RedHat_Transcript_Jan_2024RedHat_Transcript_Jan_2024
RedHat_Transcript_Jan_2024
ย 
Generative AI Business Transformation
Generative AI Business TransformationGenerative AI Business Transformation
Generative AI Business Transformation
ย 
Microsoft Learn Transcript Jan 2024- vijaymohire
Microsoft Learn Transcript Jan 2024- vijaymohireMicrosoft Learn Transcript Jan 2024- vijaymohire
Microsoft Learn Transcript Jan 2024- vijaymohire
ย 
Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0
Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0
Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0
ย 

Recently uploaded

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
ย 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
ย 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
ย 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
ย 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
ย 
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female service
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female serviceCALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female service
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
ย 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfWilly Marroquin (WillyDevNET)
ย 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
ย 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
ย 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
ย 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
ย 
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
ย 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
ย 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
ย 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
ย 
call girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
call girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธcall girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
call girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธDelhi Call girls
ย 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
ย 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
ย 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
ย 

Recently uploaded (20)

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
ย 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
ย 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
ย 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
ย 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
ย 
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female service
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female serviceCALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female service
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female service
ย 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
ย 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
ย 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
ย 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
ย 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
ย 
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
ย 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
ย 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
ย 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
ย 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
ย 
call girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
call girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธcall girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
call girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
ย 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
ย 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
ย 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
ย 

Java Programming Assignment

  • 1. Java Programming (Assignment โ€“I) Submitted in partial fulfilment of the requirements for the degree of Post Graduate Diploma in Information Technology by Vijayananda D Mohire (Registration No.200508208) Information Technology Department Symbiosis Bhavan, 1065 B, Gokhale Cross Road, Model Colony, Pune โ€“ 411016, Maharashtra, India (2007)
  • 2. 2
  • 4. 4 Table of Contents QUESTION 1 ......................................................................................................................................................................... 6 ANSWER 1 ............................................................................................................................................................................ 6 QUESTION 2 ......................................................................................................................................................................... 8 ANSWER 2 ............................................................................................................................................................................ 8 QUESTION 3 .......................................................................................................................................................................10 ANSWER 3 ..........................................................................................................................................................................10 QUESTION 4 .......................................................................................................................................................................12 ANSWER 4 ..........................................................................................................................................................................12 QUESTION 5 .......................................................................................................................................................................14 ANSWER 5 ..........................................................................................................................................................................14 QUESTION 6 .......................................................................................................................................................................16 ANSWER 6 ..........................................................................................................................................................................16 QUESTION 7 .......................................................................................................................................................................18 ANSWER 7 ..........................................................................................................................................................................18 QUESTION 8 .......................................................................................................................................................................20 ANSWER 8 ..........................................................................................................................................................................21 QUESTION 9 .......................................................................................................................................................................23 ANSWER 9 ..........................................................................................................................................................................24 QUESTION 10.....................................................................................................................................................................27 ANSWER 10........................................................................................................................................................................27
  • 6. 6 Question 1 Write a Java program that calculates and prints the simple interest using the formula : Simple Interest = PNR / 100 Input values P,N,R should be accepted as command line input as below. e.g. java SimpleInterest 5 10 15 Answer 1 Code: package Interest_Pkg; /** * Define Interest class * @author Vijayananda D Mohire * */ public class Interest { /** Creates a new instance of Interest, default constructor */ public Interest() { } /** * Main function for entry point of the project * @param args the command line arguments * */ public static void main(String[] args) { // Declare and initialize the P,N,R and SI variables double P=0; double N=0; double R =0; double SI = 0; // Check for the presence of Console input args if (args.length > 0) { try { // Read the Console inputs and convert them to double data type P = Integer.parseInt(args[0]);
  • 7. 7 N = Integer.parseInt(args[1]); R = Integer.parseInt(args[2]); } // wrap the above code in a try catch block catch (NumberFormatException e) { // For any Number Format exception caught, throw an error System.err.println("Argument must be an integer"); // Quit application with status code 1 System.exit(1); } } // Print the values of Principal, Tenure and Rate of Interest System.out.println(P); System.out.println(N); System.out.println(R); // Calculate the Simple Interest using the formula SI = (P*N*R)/100; // Print the Simple Interest earned System.out.print("The interest earned is $"); System.out.println(SI); } } Results:
  • 8. 8 Evaluatorโ€Ÿs Comments if any: Question 2 Write a program to compute sum of digits of a given number. (Hint: Separate digits one by one from the number and then add) Answer 2 package SumofDigits_Pkg; /** * Define SumofDigits class * @author Vijayananda D Mohire */ public class SumofDigits { /** Creates a new instance of SumofDigits, default constructor */ public SumofDigits() { } /** * Main function for entry point of the project * @param args the command line arguments */ public static void main(String[] args) { // Declare and initialize the variables int Number = 0; int N =0; int sum = 0; int digit =0; // Check for the presence of Console input args if (args.length > 0) {
  • 9. 9 try { // Read the Console inputs and convert them to integer data type Number = Integer.parseInt(args[0]); // wrap the above code in a try catch block } catch (NumberFormatException e) { // For any Number Format exception caught, throw an error System.err.println("Argument must be an integer"); // Quit application with status code 1 System.exit(1); } } // If entered number is negative, negate the symbol to make it positive N = Number; if (N<0) N = -N; sum=0; // loop and sum the digits, use modulos operator to isolate each digit while (N!=0) { digit = N % 10; sum = sum + digit; N = N / 10; } // Print the value of Sum of the digits obtained above System.out.print("The sum of digits is :"); System.out.println(sum); } } Results: Evaluatorโ€Ÿs Comments if any:
  • 10. 10 Question 3 The numbers in the following sequence are called the fibonacci numbers . 0 , 1 , 1 , 2, 3 , 5 , 8 , 13 , โ€ฆโ€ฆโ€ฆโ€ฆ.. Write a program using doโ€ฆ..while loop to calculate and print the first m Fibonacci numbers. (Hint : After the first two numbers in the series, each number is the sum of preceding two numbers.) Answer 3 Code: package Fibonacci_Pkg; /** * Define Fibonacci class * @author Vijayananda D Mohire */ /** * * Creates a new instance of Fibonacci, default constructor */ public class fibonacci { /** Creates a new instance of fibonacci */ public fibonacci() { } /** * Main function for entry point of the project * @param args the command line arguments */ public static void main(String[] args) { // Declare and initialize the variables int n0 = 0, n1 = 1 , n2 = 0; int M = 0;
  • 11. 11 // Check for the presence of Console input args if (args.length > 0) { try { // Read the Console inputs and convert them to integer data type M = Integer.parseInt(args[0]); // wrap the above code in a try catch block } catch (NumberFormatException e) { // For any Number Format exception caught, throw an error System.err.println("Argument must be an integer"); // Quit application with status code 1 System.exit(1); } } // Print the first two default values of the series System.out.print(n0 + "," + n1 + ","); // Loop and add the two numbers to get next number for ( int i = 0; i < M-2; i++) { n2 = n1 + n0; // Print next number in the series System.out.print(n2 + ","); // Swap the previous and next numbers n0= n1; n1= n2; } System.out.println(); } } Results:
  • 12. 12 Question 4 Write a program that converts a decimal number to Roman number. Decimal Number is accepted as command line input at the time of execution. Answer 4 Code: package RomanNumerals_Pkg; /** * Define RomanNumerals class * @author Vijayananda D Mohire */ public class RomanNumerals { /** Creates a new instance of RomanNumerals */ public RomanNumerals() { } /** * Main function for entry point of the project * @param args the command line arguments */ public static void main(String[] args) { // Declare and initialize the ROMAN variables char numerals[] = {'I', 'V', 'X', 'L', 'C', 'D', 'M'}; StringBuffer s = new StringBuffer(); char c1, c2, c3; int j; // Check for the presence of Console input args char[] decimal = args[0].toCharArray(); // Loop until length of the input Number for(int i = 0; i < decimal.length; i++) { j = (decimal.length - i - 1) * 2;
  • 13. 13 // Assign Roman values based on the Units, Tenth and Hunderedth postion of the Number c1 = numerals[j]; c2 = j + 1 < numerals.length ? numerals[j + 1] : ' '; c3 = j + 2 < numerals.length ? numerals[j + 2] : ' '; // Built the Roman number by appending it with equivalent Roman digit like I, V etc.. switch(decimal[i]) { case '1' : s = s.append(c1); break; case '2' : s = s.append(c1).append(c1); break; case '3' : s = s.append(c1).append(c1).append(c1); break; case '4' : s = s.append(c1).append(c2); break; case '5' : s = s.append(c2); break; case '6' : s = s.append(c2).append(c1); break; case '7' : s = s.append(c2).append(c1).append(c1); break; case '8' : s = s.append(c2).append(c1).append(c1).append(c1); break; case '9' : s = s.append(c1).append(c3); } } // Print the completly built number as above System.out.println(s); } } Results:
  • 14. 14 Question 5 Write a program that prints prime numbers between 1 to n. Number n should be accepted as command line input. Answer 5 Code: package PrimeNum_Pkg; /** * Define Primes class * @author Vijayananda D Mohire */ public class Primes { /** The default stopping point for primes */ public static final long DEFAULT_STOP = 4294967295L; /** The first prime number */ public static final int FP = 2; /** * Set the Maximim Size limit */ static int MAX = 10000; /** Creates a new instance of Primes */ public Primes() { } /** * * Main function for entry point of the project * @param args the command line arguments */ public static void main(String[] args) { // Declare and initialize the variables long[] prime = new long[MAX]; long stop = DEFAULT_STOP;
  • 15. 15 // Check for the presence of Console input args if (args.length == 1) { stop = Long.parseLong(args[0]); } prime[1] = FP; // P1 (ignore prime[0]) long n = FP+1; // odd candidates int j = 1; // numberFound boolean isPrime = true; // for 3 do { if (isPrime) { if (j == MAX-1) { // Grow array dynamically if needed long[] np = new long[MAX * 2]; System.arraycopy(prime, 0, np, 0, MAX); MAX *= 2; prime = np; } prime[++j] = n; // P2 isPrime = false; } n += 2; // P4 for (int k = 2; k <= j && k < MAX; k++) { // P5, P6, P8 long q = n / prime[k]; long r = n % prime[k]; if (r == 0) { break; } if (q <= prime[k]) { // P7 isPrime = true; break; } } } while (n < stop); // P3 // Print the completly Prime number list
  • 16. 16 for (int i=1; i<=j; i++) System.out.println(prime[i]); } } Results: Question 6 Write a program to print the following output using the for loop. 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 Answer 6 Code: package Triangle_Pkg; /** * Define Triangle class * @author Vijayananda D Mohire
  • 17. 17 */ public class Triangle { /** Creates a new instance of Triangle */ public Triangle() { } /** * Main function for entry point of the project * @param args the command line arguments */ public static void main(String[] args) { // Declare and initialize the variables int num =0; if (args.length == 1) num = Integer.parseInt(args[0]); else System.out.println("Please enter a Number"); // Outer loop for new line increment for(int i=1;i<=num;i++){ // Inner loop for number of times to print on each line for(int j=1;j<=i;j++){ // Print the incremented Number System.out.print(" "+i+" "); } // Print new line System.out.print("n"); } } }
  • 18. 18 Results: Question 7 Write a program to find the Factorial of a number using Recursion. Factorial can be defined as Factorial(n) = 1 * 2 * 3 โ€ฆ.* (n-1) * n. Answer 7 Code: package Factorial_Pkg; /** * Define Triangle class * @author Vijayananda D Mohire */ import java.io.Console; /** * Define Factorial class * @author Vijayananda D Mohire */ public class Factorial { /** Creates a new instance of Factorial */ public Factorial() { } /**
  • 19. 19 * Main function for entry point of the project * @param args the command line arguments */ public static void main(String[] args) { // Declare and initialize the variables int num =0; String input; // Check for Input if (args.length > 0) { try { num = Integer.parseInt(args[0]); } // Catch error and display the error catch (NumberFormatException e) { System.err.println("Argument must be an integer"); System.exit(1); } } // Loop until Number is greater than 0 while (num >= 0) { //Call the Recursive function and print the return value System.out.print("n" + num + "! = " + factorial (num)); System.out.print("nEnter a number (Less than 0 to stop): "); // Prompt for user to confirm to continue or Quit try { Console console = System.console(); input = console.readLine("Quit? "); num = Integer.parseInt( input ); } catch (Exception e) { System.err.println("Argument must be an integer"); } }
  • 20. 20 // Come put of loop if user Quits by entering negative number System.out.println("good bye!"); } // main method /** * Recursive factorial function * @param n long Recursive factorial function input * @return long number */ public static long factorial (long n) { // Return default value for number less than 2 if (n < 2) return 1; // self call and return value after multiplying n and n-1 return n * factorial(n - 1); } } Results: Question 8 Define an exception called โ€œNoMatchExceptionโ€ that is thrown when a string is not equal to โ€œSymbiosisโ€. Write a Java program that uses this exception.
  • 21. 21 Answer 8 Code: package CustomException_Pkg; import java.io.*; /** * Define CustomException class * @author Vijayananda D Mohire */ public class CustomException { /** * Define variable * */ static String s = ""; /** * Main function for entry point of the project * @param args the command line arguments */ public static void main (String args[]) { // Declare and initialize the variables for reading the input InputStreamReader is = new InputStreamReader(System.in); BufferedReader buf = new BufferedReader(is); System.out.println("Enter the word to spell match with Symbiosis: "); // try - catch to read the input line try { s = buf.readLine(); } catch (IOException e) { System.out.println("IOException was " + e.getMessage()); } // try - catch uses NoMatchException try
  • 22. 22 { checkSpelling(); // this method uses NoMatchException } catch (NoMatchException se) // but it is caught here { System.out.println("Spell exception was: " + se.getError()); } } // end main /** * Check spelling of typed in word. Throw exception if wrong. * @throws CustomException_Pkg.NoMatchException Throws Exception if the Synbol doesnot match string "Symbiosis" */ private static void checkSpelling() throws NoMatchException { if (s.equalsIgnoreCase("Symbiosis")) System.out.println("OK, Spell matched"); else throw new NoMatchException("Spell Match Error"); } } // end main class /** * Custom exception class that descends from Java's Exception class. */ class NoMatchException extends Exception { /** * Define string variable * */ String mistake; /** * Default constructor - initializes instance variable to unknown * */ public NoMatchException() { super(); // call superclass constructor mistake = "unknown";
  • 23. 23 } /** * Constructor receives some kind of message that is saved in an instance variable. * @param err Custom Error message */ public NoMatchException(String err) { super(err); // call super class constructor mistake = err; // save message } /** * public method, callable by exception catcher. It returns the error message. * @return Returns error string */ public String getError() { return mistake; } } Results: Question 9 Write a program to create an applet with red back ground and display the Message WELCOME TO THE WORLD OF APPLETS. Write its HTML document also. Specify width and height to the Applet.
  • 24. 24 Answer 9 Code: package WelcomeApplet_Pkg; import java.applet.Applet; import java.awt.*; /** * Define WelcomeApplet class * @author Vijayananda D Mohire */ public class WelcomeApplet extends java.applet.Applet { /** Initialization method that will be called after the applet is loaded * into the browser. */ public void init() { setBackground( Color.RED ); // change here the applet window color } /** Start method that will be called at the begining. */ public void start(){ System.out.println("Applet starting."); } /** Stop method that will be called at the end. */ public void stop(){ System.out.println("Applet stopping."); } /** Destroy method that will be called at the last. */ public void destroy(){ System.out.println("Destroy method called."); } /**
  • 25. 25 * Paint method that use Graphics to initiaize the required Font and Color * @param g Graphics variable */ public void paint(Graphics g) { Font font1 = new Font( "Courier", Font.BOLD, 36 ); g.setFont( font1 ); g.setColor( Color.WHITE ); g.drawString( "WELCOME TO THE WORLD OF APPLETS.!", 50, 25 ); } } ----------------WelcomeApplet_Html------------------------------ <HTML> <HEAD> <TITLE>Applet HTML Page</TITLE> </HEAD> <BODY> <H3><HR WIDTH="100%">Applet HTML Page<HR WIDTH="100%"></H3> <P> <APPLET codebase="classes" code="WelcomeApplet_Pkg/WelcomeApplet.class" width=500 height=200></APPLET> </P> <HR WIDTH="100%"><FONT SIZE=-1><I>Generated by NetBeans IDE</I></FONT> </BODY> </HTML> Results: Cmd line
  • 27. 27 Question 10 Write a program that detects successive repeated occurrence of a letter in a word. For example, in the word โ€œexplanationโ€ letter โ€žaโ€Ÿ and โ€žnโ€Ÿ occurs twice. Answer 10 Code: package repeatedletters; import java.util.*; import java.io.*; /** * Define RepLetter class * @author Vijayananda D Mohire */ public class RepLetter { /** * Main function for entry point of the project * @param args the command line arguments * @throws java.io.IOException Throws IO Exception */ public static void main(String[] args) throws IOException { // Use Buffered read BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.print("Please Enter aString "); System.out.println(); String str=br.readLine(); // Convert input String to Char array char[]buffer =str.toCharArray(); //Loop for buffer length for(int counter =0;counter<buffer.length;counter++) { char letter= buffer[counter];
  • 28. 28 int flage=0; for ( int i=0; i<buffer.length; i++) { if (letter==buffer[i]) // if letter repeation is found increment flag flage++; } if(counter==0) { // Type the occurance System.out.println("The letter ="+letter+" is repeated "+flage+" No of Times "); continue; } boolean flag=false; for(int j=counter-1;j>=0;j--) { if(letter==buffer[j]) flag=true; } if(!flag) { System.out.println("The letter ="+letter+" is repeated "+flage+" No of Times "); } } } } Results: