English

Avichal solutions for Computer Applications [English] Class 10 ICSE chapter 1.5 - Input in Java [Latest edition]

Advertisements

Chapters

Avichal solutions for Computer Applications [English] Class 10 ICSE chapter 1.5 - Input in Java - Shaalaa.com
Advertisements

Solutions for Chapter 1.5: Input in Java

Below listed, you can find solutions for Chapter 1.5 of CISCE Avichal for Computer Applications [English] Class 10 ICSE.


Review InsightEXERCISES
Review Insight [Page 65]

Avichal solutions for Computer Applications [English] Class 10 ICSE 1.5 Input in Java Review Insight [Page 65]

Review Insight | Q 1. (a) | Page 65

What is the purpose of the following function?

nextInt()

Review Insight | Q 1. (b) | Page 65

What is the purpose of the following function?

nextLine()

Review Insight | Q 2. (a) | Page 65

Predict the output in the following case:

Math.sqrt (−36)

Review Insight | Q 2. (b) | Page 65

Predict the output in the following case:

Math.pow(−4, 3);

Review Insight | Q 3. | Page 65

Why do you need to mention the keyword import in the program? 

Review Insight | Q 4. (a) | Page 65

What happens when the value of a variable is divided by zero? 

Review Insight | Q 4. (b) | Page 65

What happens when semicolon is missing in an input/ output statement? 

Review Insight | Q 5. (a) | Page 65

Name the method of scanner class that is used to input a decimal number from the console.

Review Insight | Q 5. (b) | Page 65

Name the method of scanner class that is used to input a word or text of a line from the keyboard. 

EXERCISES [Pages 65 - 67]

Avichal solutions for Computer Applications [English] Class 10 ICSE 1.5 Input in Java EXERCISES [Pages 65 - 67]

Multiple Choice Questions:

EXERCISES | Q I. 1. | Page 65

Which of the following is the right way to use a comment in Java program? 

  • /* comment */

  • /* comment

  • // comment //

  • */ comment */

EXERCISES | Q I. 2. | Page 65

Given: int p=55/0; 

Name the type of error in the given statement: 

  • Syntax

  • Logical

  • Runtime

  • Executional

EXERCISES | Q I. 3. | Page 65

The ______ method will accept a character using stream class. 

  • in.read() 

  • (char)(in.read())

  • in.readline()

  • character.read()

EXERCISES | Q I. 4. | Page 65

Which of the following method will accept a string by using scanner object? 

  • next()

  • next.read()

  • next.String()

  • next.char()

EXERCISES | Q I. 5. | Page 65

Which of the following is a method of Java Scanner class? 

  • nextline()

  • nextLine()

  • Nextline()

  • NextLine()

Fill in the blanks:

EXERCISES | Q II. 1. | Page 66

The package needed to import StrearnReaderclass is ______.

EXERCISES | Q II. 2. | Page 66

______ function accepts an integer by using scanner object. 

EXERCISES | Q II. 3. | Page 66

The package needed to import Scanner class is ______.

EXERCISES | Q II. 4. | Page 66

The keyword ______ is used to include a package in a program. 

EXERCISES | Q II. 5. | Page 65

Assigning a value of 24.3 to a variable that is defined as int type is ______ error. 

EXERCISES | Q II. 6. | Page 66

______ statement is used to accept value at runtime. 

EXERCISES | Q II. 7. | Page 66

Scanner ob = ______ Scanner(______). 

EXERCISES | Q II. 8. | Page 66

The command line argument accepts the data value as an ______ of strings.

EXERCISES | Q III. 1. | Page 66

Explain the following function:

Integer.parseint(in.readLine( )); 

EXERCISES | Q III. 2. | Page 66

Explain the following function:

(char)(in.read()); 

EXERCISES | Q III. 3. | Page 66

Explain the following function:

next();

EXERCISES | Q III. 4. | Page 66

Explain the following function:

public static void main( int b );

EXERCISES | Q III. 5. | Page 66

Explain the following function:

nextLine();

Answer the following:

EXERCISES | Q IV. 1. | Page 66

What are the different ways to give input in a Java Program? 

EXERCISES | Q IV. 2. (i) | Page 66

What is meant by a package? 

EXERCISES | Q IV. 2. (ii) | Page 66

Give an example of a package.

EXERCISES | Q IV. 3. | Page 66

What is the use of the keyword 'import' in Java programming? 

EXERCISES | Q IV. 4. | Page 66

What is a Runtime error? Explain with an example. 

EXERCISES | Q IV. 5. | Page 66

What are the different types of errors that take place during the execution of a program? Name them. 

EXERCISES | Q IV. 6. | Page 66

Give two differences between Syntax error and Logical error. 

Unsolved Java Programming:

EXERCISES | Q V. 1. | Page 66

In an election, there are two candidates X and Y. On the election day, 80% of the voters go for polling, out of which 60% vote for X. Write a program to take the number of voters as input and calculate:

  1. number of votes received by X.
  2. number of votes received by Y. 
EXERCISES | Q V. 2. | Page 66

A shopkeeper offers 10% discount on the printed price of a mobile phone. However, a customer has to pay 9% GST on the remaining amount. Write a program in Java to calculate the amount to be paid by the customer taking printed price as an input. 

EXERCISES | Q V. 3. | Page 66

A man spends `1/2` of his salary on food, `1/15` on rent, `1/10` on miscellaneous activities. Rest of the salary is his saving. Write a program to calculate and display the following:

  1. money spent on food
  2. money spent on rent
  3. money spent on miscellaneous activities
  4. money saved

Take the salary as an input.

EXERCISES | Q V. 4. | Page 66

Write a program to input time in seconds. Display the time after converting them into hours, minutes and seconds. 

Sample Input: Time in seconds: 5420
Sample Output: 1 Hour 30 Minutes 20 Seconds

EXERCISES | Q V. 5. | Page 67

The driver took a drive to a town 240 km at a speed of 60 km/h. Later in the evening, he drove back at 20 km/h less than the usual speed. Write a program to calculate: 

  1. the total time taken by the driver
  2. the average speed during the whole journey

[Hint: average speed = `"total distance"/"total time"`] 

EXERCISES | Q V. 6. | Page 67

Write a program to input two unequal numbers. Display the numbers after swapping their values in the variables without using a third variable. 

Sample Input: a = 76, b = 65
Sample Output: a = 65, b = 76

EXERCISES | Q V. 7. | Page 67

A certain amount of money is invested for 3 years at the rate of 6%, 8% and 10% per annum compounded annually. Write a program to calculate: 

  1. the amount after 3 years.
  2. the compound interest after 3 years.

Accept certain amount of money (Principal) as an input.

Hint: A = P * `(1 + ("R"1)/100)^"T"` * `(1 + ("R"2)/100)` * `(1 + ("R"3)/100)` and CI = A − P

EXERCISES | Q V. 8. | Page 67

The coordinates of two points A and B on a straight line are given as (x1, y1) and (x2, y2). Write a program to calculate the slope (m) of the line by using formula: 

Slope = `((y2 − y1))/((x2 − x1))`

Take the coordinates (x1, y1) and (x2, y2) as input. 

EXERCISES | Q V. 9. | Page 67

A dealer allows his customers a discount of 25% and still gains 25%. Write a program to input the cost of an article and display its selling price and marked price.

[Hint: SP = `((100 + p%)/100)` * CP and MP = `(100/(100 − d%))` * SP]

Solutions for 1.5: Input in Java

Review InsightEXERCISES
Avichal solutions for Computer Applications [English] Class 10 ICSE chapter 1.5 - Input in Java - Shaalaa.com

Avichal solutions for Computer Applications [English] Class 10 ICSE chapter 1.5 - Input in Java

Shaalaa.com has the CISCE Mathematics Computer Applications [English] Class 10 ICSE CISCE solutions in a manner that help students grasp basic concepts better and faster. The detailed, step-by-step solutions will help you understand the concepts better and clarify any confusion. Avichal solutions for Mathematics Computer Applications [English] Class 10 ICSE CISCE 1.5 (Input in Java) include all questions with answers and detailed explanations. This will clear students' doubts about questions and improve their application skills while preparing for board exams.

Further, we at Shaalaa.com provide such solutions so students can prepare for written exams. Avichal textbook solutions can be a core help for self-study and provide excellent self-help guidance for students.

Concepts covered in Computer Applications [English] Class 10 ICSE chapter 1.5 Input in Java are Introduction of Input in Java, Using Function Argument, Types of Errors, Comment Statements in Java Programming, Using Stream Class, Using Scanner Class, Using Command Line Argument.

Using Avichal Computer Applications [English] Class 10 ICSE solutions Input in Java exercise by students is an easy way to prepare for the exams, as they involve solutions arranged chapter-wise and also page-wise. The questions involved in Avichal Solutions are essential questions that can be asked in the final exam. Maximum CISCE Computer Applications [English] Class 10 ICSE students prefer Avichal Textbook Solutions to score more in exams.

Get the free view of Chapter 1.5, Input in Java Computer Applications [English] Class 10 ICSE additional questions for Mathematics Computer Applications [English] Class 10 ICSE CISCE, and you can use Shaalaa.com to keep it handy for your exam preparation.

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×