[solved] – Question 7268
Write a program that will read daily temperature reading for the month of January 2012. Your program should contain the following functions:
(a) main() function contains instructions of reading input needed and print all the related information.
(b) NORMAL() function calculates the number of normal days (temperature between 60F and 84F)
(c) AVERAGE() function calculates the average temperature in January 2012.
(d) DAYS() function calculates the number of days which has temperature more than the average.
Expert Answer
[solved] – Question 72755
Describe what overloading a method means.
Give examples where one would use overloaded methods.
Provide small code snippets showing an overloaded method.
Is overloading a good thing or just a waste of time?
Expert Answer
[solved] – Question 72756
Why are wrapper classes used?
Provide a situation where the use of a wrapper makes the application more manageable, and explain why.
Provide small code snippets showing the use of a wrapper.
Expert Answer
[solved] – Question 72781
Class Book
{
char book_name[20], writer [20];
int no_of_pages;
public:
void read();
void show();
};
class Tbook: private Book
{
int no_of_lessons, no_of_exercises;
protected:
int standard;
public:
void readtbook();
void showtbook();
};
class sciencebook: public tbook
{
char topic[20];
public:
void readsciencebook();
void showsciencebook();
};
(i) Name the data members and member functions which can be accessed from the member
function of class sciencebook.
(ii) Name the member functions which can be accessed by an object of
(a) class tbook
(b) class
sciencebook
Expert Answer
[solved] – Question 72892
1. Implement an array of 10 integers with following features:
a. Add an element at start
b. Add an element at end
c. Add an element at i-th index
d. Remove an element from start
e. Remove an element from end
f. Remove an element from i-th index
Expert Answer
[solved] – Question 72897
3. Write a function that merges two sorted arrays into a new array (New array should also be sorted).
Expert Answer
[solved] – Question 72899
4. Write a program in Java to swap two numbers without using third variable.
For example if
a=5, and b=4 then after calling following function
Swap (int a, int b)
a=4 and b=5.
Expert Answer
[solved] – Question 72939
int i=-1,j=10,k,l;
k=i && j;
l=i || j;
printf(“%d %d”,l,j);
Expert Answer

