Skip to main content

Programming for Problem Solving JAVA



List of Experiment



(1) Write a Program that displays Welcome to Java, Learning Java Now and Programming is fun.






(2) Write a program that solves the following equation and displays the value x and y:1)3.4x+50.2y=44.5  2) 2.1x+.55y=5.9 (Assume Cramer’s rule to solve equation  ax+by=e     x=ed-bf/ad-bc      cx+dy=f      y=af-ec/ad-bc )






(3) Write a program that reads a number in meters, converts it to feet, and displays the result.






(4) Body Mass Index (BMI) is a measure of health on weight.  It can be calculated by taking your weight in kilograms and dividing by the square of your height in meters.  Write  a  program that prompts the user to enter a weight in pounds and height in inches and displays the BMI.Note:-1 pound=.45359237 Kg and 1 inch=.0254 meters.






(5) Write a program that prompts the user to enter three integers and display the integers in decreasing order.



(6) Write a program that prompts the user to enter a letter and check whether a letter is a vowel or constant.


(7) Assume a vehicle plate number consists of three uppercase letters followed by four digits. Write a program to generate a plate number.


(8) Write a program that reads an integer and displays all its smallest factors in increasing order. For example if input number is 120, the output should be as follows:2,2,2,3,5.


(9) Write a method with following method header.public static int gcd(int num1, int num2)Write a program that prompts the user to enter two integers and compute the gcd of two integers.


(10) Write a test program that prompts the user to enter ten numbers, invoke  a method to reverse the numbers, display the numbers.


(11) Write a program that generate 6*6  two-dimensional matrix, filled with 0’s and 1’s , display the matrix,check every raw and column have an odd number’s of 1’s.


(12) Write a program that creates a Random object with seed 1000 and displays the first  100  random integers between 1 and 49 using the NextInt (49) method.  


(13) Write a program for calculator to accept an expression as a string in which the operands and operator are separated by zero or more spaces. For ex: 3+4 and 3 + 4 are acceptable expressions.


(14) Write a program that creates an Array List and adds a Loan object, a Date object, a string, and a Circle object to the list, and use a loop to display all elements in the list by invoking the object’s to String() method.


(15) Write the bin2Dec (string binary String) method to convert a binary string into a decimal number. Implement the bin2Dec method to throw a  NumberFormatException if the string is not a binary string. 


(16) Write a program that prompts the user to enter a decimal number and displays the number in a fraction.Hint: Read the decimal number as a string,  extract the integer part and fractional part from the string. 


(17) Write a program that displays a tic-tac-toe board. A cell may be X, O, or empty. What to display at each cell is randomly decided. The X and O are images in the files X.gif and O.gif. 


(18) Write a program that moves a circle up, down, left or right using arrow keys.


(19) Write a program that displays the color of a circle as red when the mouse button is pressed and as blue when the mouse button is released.


(20) Write a GUI program that use button to move the message to the left and right and use the radio button to change the color for the message displayed.


(21) Write a program to create a file name 123.txt, if it does not exist. Append a new data to it if it already exists.  Write  150  integers created randomly into the file using  Text  I/O.  Integers are separated by space.


(22) Write a recursive method that returns the smallest integer in an array.  Write a test program that prompts the user to enter an integer and display its product.



(23) Write a generic method that returns the minimum elements in a two dimensional array.


(24) Define  MYPriorityQueue class that extends Priority Queue to implement the  Cloneable interface and implement the clone() method to clone a priority queue.


(25) Write a program that reads words from a text file and displays all the nonduplicate words in descending order. The text file is passed as a command-line argument.

Comments

Contact Form

Name

Email *

Message *

Popular posts from this blog

Microsoft SQL Server 2019 Serial Key For All Edition

  Microsoft SQL Server 2019 Enterprise Edition HMWJ3-KY3J2-NMVD7-KG4JR-X2G8G Microsoft SQL Server 2019 Enterprise Core Edition 2C9JR-K3RNG-QD4M4-JQ2HR-8468J Microsoft SQL Server 2019 Standard Edition PMBDC-FXVM3-T777P-N4FY8-PKFF4 SQL Server2019 key   SQL Server 2019 Enterprise:HMWJ3-KY3J2-NMVD7-KG4JR-X2G8G Strandard:PMBDC-FXVM3-T777P-N4FY8-PKFF4 SQL Server 2017 Enterprise:TDKQD-PKV44-PJT4N-TCJG2-3YJ6B Enterprise Core:6GPYM-VHN83-PHDM2-Q9T2R-KBV83 Strandard:PHDV4-3VJWD-N7JVP-FGPKY-XBV89 Web:WV79P-7K6YG-T7QFN-M3WHF-37BXC SQL Server 2016 Enterprise:MDCJV-3YX8N-WG89M-KV443-G8249 Enterprise Core:TBR8B-BXC4Y-298NV-PYTBY-G3BCP Standard:B9GQY-GBG4J-282NY-QRG4X-KQBCR Web:BXJTY-X3GNH-WHTHG-8V3XK-T8243 SQL Server 2014 Business Intelligence:GJPF4-7PTW4-BB9JH-BVP6M-WFTMJ Developer:82YJF-9RP6B-YQV9M-VXQFR-YJBGX Enterprise:27HMJ-GH7P9-X2TTB-WPHQC-RG79R Enterprise Core:TJYBJ-8YGH6-QK2JJ-M9DFB-D7M9D Strandard:P7FRV-Y6X6Y-Y8C6Q-TB4QR-DMTTK Web:J9MBB-R8PMP-R8WTW-8JJRD-C6GGW

VS CODE PRODUCT KEY

Visul Studio 2013 Ultimate Key BWG7X-J98B3-W34RT-33B3R-JVYW9 https://www.microsoft.com/en-us/download/details.aspx?id=55992 https://go.microsoft.com/fwlink/?linkid=841310 https://www.microsoft.com/en-us/download/details.aspx?id=35747 https://downloads.i-theses.com/?task=downloads&groupid=9&id=110 Product Year Version Product Keys Visual Studio 2022 2022 Enterprise: VHF9H-NXBBB-638P6-6JHCY-88JWH Professional: TD244-P4NB7-YQ6XK-Y8MMM-YWV2J Visual Studio 2020 2020 HG8FD-DR6F8-T7G9Y-H80UI-9NUB8 YV7T8-R6C8R-C6VT9-7GBHY-80NUJ T6RX5-EZXCR-6VT7B-Y80NU-HBGVF CDX5X-7E5CR-86VT7-9BY9V-7TC8R Visual Studio 2019 2019 16.x Professional: NYWVH-HT4XC-R2WYW-9Y3CM-X4V3Y Enterprise: BF8Y8-GN2QH-T84XB-QVY3B-RC4DF Visual Studio 2017 2017 15.x Test Professional: VG622-NKFP4-GTWPH-XB2JJ-JFHVF Professional: KBJFW-NXHK6-W4WJM-CRMQB-G3CDH 4F3PR-NFKDB-8HFP7-9WXGY-K77T7 Enterprise: NJVYC-BMHX2-G77MM-4XJMR-6Q8QF N2VYX-9VR2K-T733M-MWD9X-KQCDF Visual Studio 2015 2015 14.x Profession...

Here’s How to Unlock Bootloader on Poco F1

Xioami’s Poco F1 has so far received great reviews from most users, and despite some persistent bugs, the phone remains amazing value for money. The  Poco F1 is selling in significant numbers , according to the company, and one factor that might have drawn Android enthusiasts to the phone is the support for bootloader unlock. At the launch event, Poco’s Product Manager Jai Mani shared the  company’s vision of making the Poco F1 a developer-friendly device . In line with this, the company  released Poco F1’s kernel source . Another issue solved by Poco was the reduction in the waiting time before users can unlock the F1 bootloader. Xiaomi does not allow users to unlock bootloaders on their own and they must apply for the unlocking, and this  process takes 30-60 days for Xiaomi devices .  Poco brought this down  to a commendable  minimum waiting period of three days , and while it is still painful to wait for this duration...