Construct an algorithm that will count from 1 to 10 and print each number counted using repetition structure.
“Code reuse is strong features of java” proof this statement.
Construct an algorithm that will input a grade of student and determine whether the grade is passed or failed(Passing grade is 60). Print the, grade and remark of student.
Create an algorithm that will input values for A and B. Compare two values inputted and print which of the values is higher including the remark “Higher”.
Write a program that computes the value of the expression: lim(x->inf)(1+1/n)n
between certain values of n and then compare the values with e.
For example, you can compute the values of the expression between:
The program should accept as input:
(Note: The increment value of 100 should be hardcoded in the program upon final submission.)
The program should then output the value of the expression for each value of n in the specified range with a decimal precision of 8.
Implement a standalone product search program in Java that lists matching products for a user who is looking for T-shirts.
You are given 3 CSV files, each containing the T-shirts data for Nike, Puma and Adidas respectively. Sample CSV files links are attached here for reference. You can add more data in existing files or can add more CSV files for another companies.
Bianca is preparing special dishes for her daughter’s birthday.
It takes her a minutes to prepare the first dish, and each following dish takes b minutes longer than the previous dish. She has t minutes to prepare the dishes.
For example, if the first dish takes a = 10 minutes and b = 5, then the second dish will take 15 minutes, the third dish will take 20 minutes, and so on.
If she has 80 minutes to prepare the dishes, then she can prepare four dishes because 10 + 15 + 20 + 25 = 70.
Write a program that prompts the user to enter the values of a, b, and t, and outputs the number of dishes Bianca can prepare.
Suppose you have two arrays: a1[0…n-1] of size n and a2[0….m-1] of size m. Write a program that checks whether a2[] is a subset of a1[] or not. Both the arrays may or may not be sorted. It can be assumed that elements within an array are distinct.
Create a Java program that simply outputs the text "Hello World" when you run it. Call your main class
"Application". In the same file as your main "Application" class, define a new class called "Person". You
don't need to put anything in the class. Now, right below where you output "Hello World" in your main
method, create an object from that (Person) class. Modify your "Person" class to add a constructor.
Make the constructor output the text "Constructor running!". Add another constructor in addition to
the constructor it's already got. Make this second constructor accept a parameter called name of type
String. Make this second constructor print the name parameter using System.out.println(). Finally,
change your "main" method, create two objects of Person class and call both constructors.
Write a program with a mother class animal. Inside it define a name and an age variables, and
set_value() method.Then create two instance variables Zebra and Dolphin which write a message
telling the age, the name and giving some extra information (e.g. place of origin).