62 416
Assignments Done
99,4%
Successfully Done
In June 2018

Java | JSP | JSF Answers

Questions: 1 141

Free Answers by our Experts: 889

Ask Your question

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 & Filtering

write a program that asks for the % averages for labs, midterm, final, the project, etc, and calculates the final grade.

Activity Weight
Labs 20 %
Reading Quizzes 10 %
Video Grading 10 %
Midterm 20 %
Project 15 %
Final 20 %
Instructor Discretion 5 %

Enter Labs average in percent: 90
Enter Reading average in percent: 75
Enter Video average in percent: 100
Enter Midterm average in percent: 83
Enter Project average in percent: 95
Enter Final average in percent: 80
Enter Instructor Discretion average in percent: 100
Your average is 87.35%
Text messaging is a popular means of communication. Many abbreviations are in common use but are not appropriate for formal communication. Suppose the abbreviations are stored, one to a line, in a text file named abbreviations.txt. For example, the file might contain these three lines:

lol
:)
Iirc
4
u
ttfn

Write a program that will read a message from another text file and surround each occurrence of an abbreviation with <> brackets. Write the marked message to a new text file.

For example, the message to be scanned is

How are u today? Iirc, this is your first free day. Hope you are having fun! :)

the new text file should contain

How are <u> today? <Iirc>, this is your first free day. Hope you are having fun! <:)>

Write a program that checks a text file for several formatting and punctuation matters. The program asks for the names of both an input file and an output file. It then copies all the text from the input file to the output file, but with the following two changes: (1) Any string of two or more blank characters is replaced by a single blank; (2) all sentences start with an uppercase letter. All sentences after the first one begin after either a period, a question mark, or an exclamation mark that is followed by one or more whitespace characters.
Write a program that reads a file of numbers of type int and writes all the numbers to another file, but without any duplicate numbers. Assume that the numbers in the input file are already ordered from smallest to largest. After the program is run, the new file will contain all the numbers in the original file, but no number will appear more than once in the file. The numbers in the output file should also be sorted from smallest to largest. Your program should obtain both file names from the user. Use either a text file or a binary file. For the text-file version, assume one number per line. For the binary-file version, use numbers of type int that are written using writeInt.
Write a program that searches a file of numbers and displays the largest number, the smallest number and the average of all the numbers in the file. Do not assume that all the numbers in the file are in any special order. Your program should obtain the file name from the user. Use either a text file or a binary file. For the text-file version, assume one number per line. For the binary-file version, use numbers of type double that are written using writeDouble
Suppose that you are in charge of customer service for a certain business. As phone calls come in, the name of the caller is recorded and eventually a service representative returns the call and handles the request. Write a class ServiceRequests that keeps track of the names of callers. The class should have the following methods:
addName (name) – adds a name to the list of names. Throws a ServiceBackUpException if there is no free space in the list.
removeName (name) – removes a name from the list. Throws a NoServiceRequestException if the name is not in the list.
getName(i) – returns the i’th name in the list.
getNumber – returns the current number of service requests.
Write a program that uses an object of type ServiceRequests to keep track of customers that have called. It should have a loop that, in each iteration, attempts to add a name, remove a name, or print all names. Use an array of size 10 as the list of names.

Write a program that converts dates from numerical month-day format to alphabetic month-day format. For example, input of 1/31 or 01/31 would produce January 31 as output. The dialogue with the user should be similar to that shown in Programming Project 2. You should define two exception classes, one called MonthException and another called DayException. If the user enters anything other than a legal month number (integers from 1 to 12), your program should throw and catch a MonthException. Similarly, if the user enters anything other than a valid day number (integers from 1 to either 29, 30, or 31, depending on the month), your program should throw and catch a DayException. To keep things simple, assume that February always has 28 days.
Create a java program that will count all words in a sentence. The program should have a
minimum of two classes.
1.1 The first class should be named class1, this class will have the following:
 The main method (starting point) (5)
 The object of class2 (5)
 Should also call the get method count_words(String str) (5)
1.2 The second class should be named class2, this class should have the following:
 A constructor (5)
 A get method named count_words(String str) (10)
1.3 Constract a flowchart for class1 and class2 both combined. (10)
Hello, you must be willing to work on a small javafx project that is 80% done. Further details can be submitted along with .txt, pictures, and javacode needed for the completion of the project.
Modify the following method to use a for loop instead of the while loop:
public static void sumTo()
{
int n; int total = 0; int count = 0;
String output = “”;
String str;
str = JOptionPane.showInputDialog(“Give me a number to sum to: “);
n = Integer.parseInt(str);
while (count ,= n)
{
total = total + count;
output += count +”:\t” + total + “\n”;
count = count + 1;
}
JOptionPane.showMessageDialog(null, output);
}
Submit
Privacy policy Terms and Conditions