Answer:
Car car = new Car();
Explanation:
Here we declare a variable called car which is a reference to an object of type Car.
Next we create a new object of type Car by using the new keyword. Here we are invoking no argument constructor of class Car. In case the car class has other constructors which take additional arguments, we could have initialized our object using the corresponding version of new.
The reference variable car is initialized then to the newly created object of type Car as described in the previous step. Now we can use the car reference variable to invoke relevant methods defined in the Car class.
Answer:
A computer helps accountants store and access financial records, make changes and alleviate the need to keep paper files. If paper work is needed, computer files can easily be accessed and printed along with any changes the accountant makes at any given time.
Answer:
He can use following computer program to make the class room more interesting and effective:-
- 1. <u>Reference software</u> : This software help students to access the atlases and dictionaries.Teacher can include this software in research projects .
- 2. <u>Educational Games</u>: This types of software is very effective for younger children because it motivates them to learn.This software companies have combined gaming and education into one .
- 3. <u>Graphical software</u> : Student can use this software to create and changes images available on the internet itselfs .
Answer:
Code is given below and output is attached as an image.
Explanation:
#include <iostream>
#include <fstream>
using namespace std;
bool isPalindrome(int n)
{
// Find reverse of n
int rev = 0;
for (int i = n; i > 0; i /= 10)
rev = rev * 10 + i % 10;
// If n and rev are same,then n is a palindrome
return (n == rev);
}
int main()
{
int min = 1; // Lower Bound
int max = 200; // Upper Bound
ofstream myfile;
myfile.open("palindrome.txt");
for (int i = min + 1; i < max; i++)
if (isPalindrome(i))
myfile << i << endl;
myfile.close();
return 0;
}