Advertisements
Chapters
1.2: Elementary Concept of Objects and Classes
1.3: Values and Data Types
1.4: Operators in Java
1.5: Introduction to Java
▶ 1.5: Input in Java
1.6: Mathematical Library Methods
1.7: Conditional Statements in Java
1.8: Iterative Constructs in Java
1.9: Nested Loop
2: Library Classes
3: Arrays (Single Dimensional and Double Dimensional)
4: String Handling
5: User - Defined Methods
6: Class as the Basis of all Computation (Objects and Classes)
7: Constructors
8: Encapsulation and Inheritance
![Avichal solutions for Computer Applications [English] Class 10 ICSE chapter 1.5 - Input in Java Avichal solutions for Computer Applications [English] Class 10 ICSE chapter 1.5 - Input in Java - Shaalaa.com](/images/computer-applications-english-class-10-icse_6:1e1eb1b47d2b4696b609e5cd9260118f.jpg)
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.
Avichal solutions for Computer Applications [English] Class 10 ICSE 1.5 Input in Java Review Insight [Page 65]
What is the purpose of the following function?
nextInt()
What is the purpose of the following function?
nextLine()
Predict the output in the following case:
Math.sqrt (−36)
Predict the output in the following case:
Math.pow(−4, 3);
Why do you need to mention the keyword import in the program?
What happens when the value of a variable is divided by zero?
What happens when semicolon is missing in an input/ output statement?
Name the method of scanner class that is used to input a decimal number from the console.
Name the method of scanner class that is used to input a word or text of a line from the keyboard.
Avichal solutions for Computer Applications [English] Class 10 ICSE 1.5 Input in Java EXERCISES [Pages 65 - 67]
Multiple Choice Questions:
Which of the following is the right way to use a comment in Java program?
/* comment */
/* comment
// comment //
*/ comment */
Given: int p=55/0;
Name the type of error in the given statement:
Syntax
Logical
Runtime
Executional
The ______ method will accept a character using stream class.
in.read()
(char)(in.read())
in.readline()
character.read()
Which of the following method will accept a string by using scanner object?
next()
next.read()
next.String()
next.char()
Which of the following is a method of Java Scanner class?
nextline()
nextLine()
Nextline()
NextLine()
Fill in the blanks:
The package needed to import StrearnReaderclass is ______.
______ function accepts an integer by using scanner object.
The package needed to import Scanner class is ______.
The keyword ______ is used to include a package in a program.
Assigning a value of 24.3 to a variable that is defined as int type is ______ error.
______ statement is used to accept value at runtime.
Scanner ob = ______ Scanner(______).
The command line argument accepts the data value as an ______ of strings.
Explain the following function:
Integer.parseint(in.readLine( ));
Explain the following function:
(char)(in.read());
Explain the following function:
next();
Explain the following function:
public static void main( int b );
Explain the following function:
nextLine();
Answer the following:
What are the different ways to give input in a Java Program?
What is meant by a package?
Give an example of a package.
What is the use of the keyword 'import' in Java programming?
What is a Runtime error? Explain with an example.
What are the different types of errors that take place during the execution of a program? Name them.
Give two differences between Syntax error and Logical error.
Unsolved Java Programming:
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:
- number of votes received by X.
- number of votes received by Y.
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.
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:
- money spent on food
- money spent on rent
- money spent on miscellaneous activities
- money saved
Take the salary as an input.
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
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:
- the total time taken by the driver
- the average speed during the whole journey
[Hint: average speed = `"total distance"/"total time"`]
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
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:
- the amount after 3 years.
- 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
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.
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
![Avichal solutions for Computer Applications [English] Class 10 ICSE chapter 1.5 - Input in Java Avichal solutions for Computer Applications [English] Class 10 ICSE chapter 1.5 - Input in Java - Shaalaa.com](/images/computer-applications-english-class-10-icse_6:1e1eb1b47d2b4696b609e5cd9260118f.jpg)
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.