Java | JSP | JSF Answers

Questions answered by Experts: 3 611

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Write a program that displays the following pattern:

*
***
*****
*******
*****
***
*

Output. Seven lines of output as follows: The first consists of 3 spaces followed by a star. The second line consists of 2 spaces followed by a 3 stars. The third consists of one space followed by 5 stars, and the fourth consists just of 7 stars. The fifth line is identical to third, th sixth to the second and the seventh to the first.

CLASS NAMES. Your program class should be called StarPattern
getting error as "com.mysl.jdbc.Driver" when trying to run a simple programe named as iit registration
Create programs that, given a range of integers by its lower and upper limit, construct a list of all prime numbers in that range.
kindly help me make a java program that will output 6 pets according to their type. It will first ask the user to enter the type of pet."c" or "d". if the user enters "c" , it will ask the user to enter name for the "cat", else will ask the user to enter name for dog. then output first all cats name, then followed by the list of all dogs name.
Design a currency Converter class in java whose object will handle conversion of three currencies (Dollar, Peso, Pound). A single object of the new currency Converter class you design here will handle all these three currencies. Instead of having specific conversion methods such as toDollar, toPound and so forth, the new currency Converter class supports one generic conversion method call exchange. The method has three arguments: fromCurrency, toCurrency and amount. The first two arguments are String and give the names of currencies. The third argument is the amount that need to be converted. For example, to convert RM250 to dollar, we write:

dollar = converter.exchange(‘peso”, “dollar”, 250.0);


To set the exchange rate for a currency, we use the setRate method. This method takes three arguments. The first two arguments are the currency names, and the third argument is the rate. For example, if the exchange rate for dollar is 2.1 Dollar to Peso1, then we write:

converter.setRate(“dollar”, “peso”, 2.1);

In addition, the class also have the following method:

updateRate (“fromCurrency”, “toCurrency”, newRate) - The first two arguments are the currency names, and the third argument is the new exchange rate.


Finally, test your program by creating its object in the main() method.
Write a program that calculates the minimum, maximum, average and standard deviation (s) of the exam score in a subject. The program will accepts the score and quit if negative score is enter.
The function will return true if and only if a passport holder satisfies following conditions-

A passport holder should not be a criminal.
A passport holder must have only one nationality and it should be "Indian".
A passport holder must be living at current address for more than 12 months.
A valid passport holder must hold at least two degrees from the list: "High School". "Intermediate", "Graduate", "Professional"

Write a method:

boolean isValidIndianPassportHolder(boolean isCriminal, String[] nationalities, float livingMonths, String[] qualifications);

isCriminal Value of this variable will be true, if passport holder is criminal otherwise false
nationalities A string array of nationalities which cannot be null
livingMonths This variable defines the number of months the passport holder was living at the given address
qualifications This variable defines a string array which defines qualifications (e.g. �High School�, �Intermediate�, �Graduate�), of th
A palindrome is a word or phrase that reads the same forward and backward, ignoring blanks and considering uppercase and lowercase versions of the same letter to be equal.for example,the following are palindromes:
1.warts n straw
2.radar
3.able was I ere I saw Elba
4.xyzczyx
Write a program that will accept a sequence of characters terminated by a period and will dedide whether the string--without the period---is a palindrome.You may assume that the input contains only letters and blanks and is at most 80 characters long.Include a looop that allows the user to check additional strins until she or he requests that the program ind. Hint Define a static method called isPalindrome
that begins as follows:
/**
Precondition: The array a contains letters and blanks in positions a[0] through a[used - 1]. Returns true if the string is a palindrome and false otherwise.
*/
public static boolean isPalindrome(char[] a, int used)

Your program shoud read the input characters int an arra y whose base type is char and then call the preceding method.the int variable used keeps track of how nuch of the array is used, as described in the section entitled "Partially Filled Arrays."
Write a program that uses a two-dimensional array to store the highest and lowest temperatures for each month of the year. The program should output the average high, average low, and highest and lowest temperatures of the year. Your program must consist of the following methods:

a) Method getData: This method reads and stores the data in the two-dimensional array.
b) Method averageHigh: This method calculates and returns the average high temperature of the year.
c) Method averageLow: This method calculates and returns the average low temperature of the year.
d) Method indexHighTemp: This method returns the index of the highest temperature in the array.
e) Method indexLowTemp: This method returns the index of the lowest temperature in the array.


(Note: These methods must all have the appropriate parameters)
Can you help me to make pseudocode of Sally's Spa game, I really need it..
Because I dont know anything about how to make it..
PLEASE
LATEST TUTORIALS
APPROVED BY CLIENTS