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 reads a list of words. Then, the program outputs those words and their frequencies. The input begins with an integer indicating the number of words that follow. Assume that the list will always contain fewer than 20 words.

Ex: If the input is: 

5 hey hi Mark hi mark

the output is: 

hey - 1
hi - 2
Mark - 1
hi - 2
mark - 1

Hint: Use two vectors, one vector for the strings and one vector for the frequencies.


Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, which indicates a threshold. Output all integers less than or equal to that last threshold value. 

Ex: If the input is: 

5 50 60 140 200 75 100

the output is:

50,60,75,

The 5 indicates that there are five integers in the list, namely 50, 60, 140, 200, and 75. The 100 indicates that the program should output all integers less than or equal to 100, so the program outputs 50, 60, and 75.

For coding simplicity, follow every output value by a comma, including the last one. 

Such functionality is common on sites like Amazon, where a user can filter results.


Imagine a class of TV with data members Name, brand, model and price. Give appropriate data types of data members. Write the following functions in this use case scenario.

·      Display function for all members and write this function outside of the class

·      Add three of constructors as discussed in class

·      Add destructor

·      Write setter and getter

·      Create object and call the function accordingly

·      All inputs should be user runtime inputs


Three dry cells each having internal resistance of 0.50 and an e.m.f of 1.5V are in series with a 1000 Blatooth, a 1000 wifi module both in parallel and a 350 GSM modules to form a simple telephone circuit. The connecting wires have a total resistance of 20 and low noise amplifier of 300. Compute the low noise amplifier voltage (4marks] b) Three ruszors, two of 4K8 boch in parallel and a third one, are connected in series. A fourth resistor of 4M5 and fifth of twice the value of the third resistor together in series are connected in parallel with this circuit. The equivalent resistance of all the five resistors is given by 3KS L Calculate the value of the third and fith resistors. H. If a banery with eaf of 20V is connected to this final circuit, calculate the curcax through the fifth resistor Repeat for capacitors. [6marks]


Create a program named ConsoleAppException that divide 2 numbers and display the result. Ensure that your program implements the exception handling. Again, the program should have a constructor that initialize the result to zero. The calculation should happen in a method named Division() that takes two parameters (num1 and num2). The main method is only used to call the division() method . Use 25 for num1 and 0 for num2

TASK Your task is to design and implement a program that manages student information stored in three separate files, and extracts a report for each student, and a summary for each course. The content of the files is as follows: • students.txt – This file contains unique student records consisting of the student identity number, surname and first name. • courses.csv – This file contains unique course records in a comma separated (.csv) file. Each record contains a course code, course description/title and the weighting of the continuous assessment (CA) and examination marks. The weighting/rate is a value between 0 and 1, and the sum of CA and examination weighting must be equal to 1. • enrolments.txt – Each student can register/enrol in one or more courses, and each course can be taken by many students. This file contains the details of each student registration/enrolment including the student identity number, course code, the CA mark and examination mark. 



Create a short program that will print 123467.89 as currency using NumberFormat

Negative Allergy (JAVA)

by CodeChum Admin

Whole numbers are great, but I think we should also pay attention to decimal numbers, too.


So, how about we make a program that involves a lot of decimals?


Instructions:

  1. Continuously ask for floating point values (decimal numbers) using the do…while() loop, sum them all up, and store the total into one variable.
  2. The loop shall only terminate for the following reasons:
  3. A negative decimal number is inputted (but still included in the total sum)
  4. The total sum reaches 100.0 or more

Instructions

  1. Continuously ask for floating point values (decimal numbers) using the do…while() loop, sum them all up, and store the total into one variable.
  2. The loop shall only terminate for the following reasons:
  3. A negative decimal number is inputted (but still included in the total sum)
  4. The total sum reaches 100.0 or more

Input

Multiple lines containing float number on each.

1.1
1.2
1.3
1.4
-1.0

Output

A line containing a float number with two decimal places.

4.00

Suppose you are an operating system designer and have been approached by the system administrator to help solve the recurring deadlock problem in your installation’s spooling system. What features might you incorporate into the operating system so that deadlocks in the spooling system can be resolved without losing the work (the system processing) that was underway or already performed by the deadlocked processes? Discuss using a short essay summary to explain how you go about solving deadlock problems


Create a class named Apartment that holds an apartment number, number of bedrooms, number of baths, and rent amount. Create a constructor that accepts values for each data field. Also create a get method for each field. Write an application that creates at least five Apartment objects. Then prompt a user to enter a minimum number of bedrooms required, a minimum number of baths required, and a maximum rent that the user is willing to pay. Display data for all the Apartment objects that meet the user’s criteria or an appropriate message if no such apartments are available. Save the files as Apartment.java and TestApartments.java

LATEST TUTORIALS
APPROVED BY CLIENTS