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

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





population and the growth rate . The method determines and returns the total population based on the current





population and growth rate.




b) Write a method Over180Million that accepts a positive value representing the population. 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.




c) 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 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 180 million people. The program must also display Brazil’s total population




in this year.

a) Write a method GetOneStudent that asks a student for both of his/her WRAV101 and



WRSC111 marks (each as a real number). The method must return both of these marks. The



method must ensure that each of the marks is in the range 0 to 100.



b) Write a method CanContinue that takes as input two marks, one for WRAV101 and one for



WRSC111. Each of these marks is in the range 0 to 100. The method must return the value



true if both of these marks are at least 50, otherwise the method must return the value false.



c) Write a method DisplayDecision that takes as input two marks, one for WRAV101 and one



for WRSC111. Each of these marks is in the range 0 to 100. If the student can continue with



the second semester modules (use CanContinue above), an appropriate message and the



average mark for the two modules is displayed, otherwise the student is informed that he may



not continue.



1. Create four (4) Java classes. Name them RunEmployee, Employee, FullTimeEmployee, PartTimeEmployee. The RunEmployee class shall contain the main method and will be used to execute the program.



2. Write a simple payroll program that will display employee’s information. Refer to the UML Class Diagram for the names of the variable and method. This should be the sequence of the program upon execution:



a. Ask the user to input the name of the employee.



b. Prompt the user to select between full time and part time by pressing either F (full time) or P (part time).



c. If F is pressed, ask the user to type his monthly salary. Then, display his name and monthly salary.




Write a program to overload operators in the same program by writing suitable operator member functions for following set of expressions:

O5= (O1/O2) *(O3+O4)

[Here O1,O2,O3,O4 and O5 are objects of a class “overloading”, and this class is having one integer data member]  


Write a program to overload operators in the same program by writing suitable operator member functions for the following set of expressions:


O5=(O1/O2)*(O3+O4)


(Here O1,O2,O3,O4 and O5 are objects of a class overloading and this class is having one integer data member

Write a program that will determine the best second year student.

write a class definition for Student class that contains four private data members


you want to buy a particular stock at its lowest price and sell it later at its highest price,since the stock market is unpredictable,you steal the price plans of a company for this stock for the next N days.

Find the best price you can get to buy this stock to achieve maximum profit.

Note:The initial price of the stock is 0.

Input1:Nnumber of days.

Input2:Array representing changing stock price for the day.

Output: Your function must return the best price to buy the stock at.

Example:

Input1:5

Input2:{-39957,-17136,35466,21820,-26711}

Output:-57093


Generate 1 Hz , 5 Hz and 10 Hz signals with amplitudes 3, 2, 1


NB:Sine Waves

Write a program to take input for n number of employee records and write records of all employees in a file named: “record1”. Also write records of all those employees in another file named: “record2” who are taking salary more than 50,000. After writing records in both files, merge their contents in another file: “finalrecord” and read all records of “finalrecord” file and display on screen. [Attributes of employee: emp_id, emp_name, emp_experience, emp_salary]


(Inserting Elements in a Linked List in Sorted Order) Write a program that inserts 25 random integers from 0 to 100 in order into a Linked List object. The program should sort the elements, then calculate the sum of the elements and the floating-point average of the elements


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS