Questions: 1 835

Answers by our Experts: 1 539

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 in 10 midday temperatures for Port Elizabeth, for 10 consecutive days.

Only temperatures higher than 0 and less than 45 are valid (working with integer values for

temperatures). It must calculate and display the following:

• The warmest temperature

• The average temperature

• The number of days that the temperature was higher than 30

• The list of temperatures entered



Class Counter

-define the data members as per the given specifications.

-define the constructor with public visibility.

-the array data will contain 0 or 1 always.

-Implement the below methods for this class:

-String getCount():

· Write a code that gives the output on the below conditions -

1. If the count of zeros is even and the count of one is also even then return "Great".

2. If the count of zeros is odd and the count of one is also odd then return "Great".

3. If the count of zeros is even and the count of odd then throw ExceptionOne with a message "One comes odd times".



2. The Ion Realty Sales Corporation would like to have a listing of their sales over the past few months. Write a program that accepts any number of monthly sales amounts. Display the total of the values. Display a report showing each original value entered and the percentage that value contributes to the total. You may prompt the user for the number of values to be inputted.


Write a two class solution that includes data members for the name of the course, current enrollment, and maximum enrollment. Include an instance method that returns the number of students that can still enroll in the course. The To String( ) method should return the name of the course, current enrollment, and the number of open slots. Design your solution using parallel arrays. Declare an array of class objects in your implementation class. Test your application with the following data:


The Ion Realty Sales Corporation would like to have a listing of their sales over the past few months. Write a program that accepts any number of monthly sales amounts. Display the total of the values. Display a report showing each original value entered and the percentage that value contributes to the total. You may prompt the user for the number of values to be inputted.


Write a program that requests the user for a year (you can assume the year will always be at


least 2000), the population of Brazil in that year (in terms of millions of people) and the annual


population growth rate (always as a real number in the range 0 – 1), and then uses the two


methods written above to determine and display the year in which Brazil’s population first


exceeded/exceeds 18




a) Write a method PopulationTotal that accepts 2 positive values, namely the current

population (in millions, e.g. a value of 1.5 means 1.5 million people) and the growth rate (e.g.

0.14 means 14%). The method determines and returns the total population based on the current

population and growth rate. For example, if the current population for a country is 1.165 million

people, and the annual population growth rate is 10%, then the total population is 1.2815 million

people after 1 year.

b) Write a method Over180Million that accepts a positive value representing the population (in

millions). The method determines whether the population is over 180 million people, and returns

a value of true if this is so, otherwise returns a value of false.


. Write a program that performs the following tasks: a) declares an array of 5 books, prompt the user for the details of the book and load them in the declared array. b) The application should allow the user to find and display all the book(s) published by the same author. c) The user should be able to find the number of copies available for the same book. E.g Absolute Java, 7th Edition by Walter Savitch. You want to know, how many copies does this book has? In the array.


. Create class representing a book, assume that this book has, title, author edition. Include all constractors, mutator and accessor methods. This class should override both toString() and equals() methods


Create three arrays of type double. Do a compile-time initialization and place different values in two of the arrays. Write a program to store the product of the two arrays in the third array. Produce a display using the Message Box class that shows the contents of all three arrays using a single line for an element from all three arrays. For an added challenge, design your solution so that the two original arrays have a different number of elements. Use 1 as the multiplier when you produce the third array.


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS