Astro in brief
Find out what makes Astro awesome!
Theory
Lab Programs
-
Build a program called “GuessMyNumber”. The computer will generate a random number between 1 and 10. The user types in a number and the computer replies “lower” if the random number is lower than the guess, “higher” if the random number is higher , and “correct!” if the guess is correct. The player can continue guessing until the guess is right.
-
Write a java program to create two separate arrays of integers. Elements of both the arrays shall be read from keyboard input. Program should display “Arrays are symmetrical” if both the arrays contain equal numbers of even and odd numbers.
-
Create a Java class called Student with the following details as private instance variables within it. USN Name Branch Phone Write a Java program to create n number Student objects and print the USN, Name,Branch, and Phone of these objects with suitable headings
-
Design a super class called Staff with details as StaffId, Name, Phone, Salary.Extend this class by writing three subclasses namely Teaching (domain, publications), Technical (skills), and Contract (period). Write a Java program to read and display at least 3 staff objects of all three categories.
-
Develop a java application to implement distance converter (meter to KM, miles to KM and vice versa), time converter (hours to minutes, seconds and vice versa) using packages
-
Write a program to generate the resume. Create 2 Java classes Teacher (data: personal information, qualification, experience, achievements) and Student (data: personal information, result, discipline) which implements the java interface Resume with the method biodata().
-
Write a Java program that implements a multithreaded application that has three threads. First thread generates a random integer for every 1 second; second thread computes the square of the number and prints; third thread will print the value the cube of the number.
-
Write a Java program to read n number of integers into an array. Raise an appropriate exception (ArithmeticException,InputMismatchException ArrayOutOfBoundsExcception) while performing following operations;a) Dividing each element by the smallest element in an array. b) reading elements from the keyboard c) accessing the element from the index specified by the keyboard entry.Concept of exception handling using multiple catch blocks to be used in this scenario.
-
Write a program to count the number of capital letters, display the position of each capital letter , no; of digits and no: of occurrences of each vowel in a user entered string via keyboard.
-
Write a program that will count the number of characters, words, and lines in a file. Words are separated by a white-space character. Your program should prompt the user to enter a filename
-
Develop a java program to validate the USN value entered by the user by making use of user defined exception handling concept.Valid usn number will have the format “4NMmmXYnnn” where mm is numeric value ranging from 01 to 22 , valid values for XY are “CS”,”CV”,”AI”,”EE”,”EC”,”ME”,”RE”,”BT”,”IS”,”CC”,”DS” and nnn is running 3 digit number.The exception message will be “Invalid USN”,”Invalid Year”,”Invalid branch code”,”Invalid Running number” dependending on the error in the value entered.