Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
58 views
14 pages
Switch Case
Fuck
Uploaded by
Agnish Samajpati
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save switch case (2) For Later
Download
Save
Save switch case (2) For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
58 views
14 pages
Switch Case
Fuck
Uploaded by
Agnish Samajpati
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save switch case (2) For Later
Carousel Previous
Carousel Next
Download
Save
Save switch case (2) For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 14
Search
Fullscreen
= te tor Question 12 Write a program using switch case to find the volume of a cube, a sphere and a cuboid. For an incorrect choice, an appropriate error message should be displayed. 1. Volume of a cube = s*s*s 2. Volume of a sphere = (4/3) *m*r* r*r (m= (22/7)) 3. Volume of a cuboid = I*b*hCsi TY = eee Question 14 In order to purchase an old car, the depreciated value can be calculated as per the tariff given below: No. of years Rate of used depreciation 1 10% 2 20% 3 30% 4 50% Above 4years 60% Write a menu driven program to input showroom price and the number of years the car is used ('1' for one year old, '2' for two years old and so on Calculate the depreciated value. the original price of the car, depre value and the amount to be paid. i“ = = ” Prev Exercises Chapters NextQuestion 15 Using a switch case statement, write a menu driven program to convert a given temperature from Fahrenheit to Celsius and vice-versa. For an incorrect choice, an appropriate message should be displayed. Hint: ¢ = 5/9*(f£-32) and f=1.. 8%¢c+32CYA © +S Seo ul A ig 62% = wile tre KboatTemperature.java Question 16 The volume of solids, viz. cuboid, cylinder and cone can be calculated by the formula: 1. Volume of a cuboid (v = I*b*h) 2. Volume of a cylinder (v = 1*r2*h) 3. Volume of a cone (v = (1/3)*r*r2*h) Using a switch case statement, write a program to find the volume of different solids by taking suitable variables and data types.CSya OQ @ wledgeboatcom + = We rn ‘Kumar Electronics’ has announced the following seasonal discounts on purchase of certain items. . Discount Discount Purchase on Amount Desktop Laptop Pc Up to = 0.0% 5.0% 25000 % 25,001 toz 5% 7.5% 50,000 % 50,001 toz 7.5% 10.0% 1,00,000 More than CJ 10.0% 15.0% % 1,00,000 i = = 1 Prev Exercises Chapters NextCSya ra @ wledgeboat.com = whe kayecse p to 25000 0.0% % 25,001 toz 50,000 5% = 50,001 toz 1,00,000 7.5% More than % 1,00,000 10.0% + @ 5.0% 7.5% 10.0% 15.0% Write a program to input name, amount of purchase and the type of purchase (L for Laptop and 'D' for Desktop) by a customer. Compute and print the net amount to be paid by a customer along with his name. (Net amount = Amount of purchafe® | discount) Prev Exercises Ch apters = NextCSya ree BW (-%<(e(-1o1-)-1 eco) eC) = we pe Question 6 An Electricity Board charges for electricity per month from their consumers according to the units consumed. The tariff is given below: Units Consumed Charges Up to 200 units 3.80/unit More than 200 units | . %4.40/unit and up to 300 units More than 300 units | %5.10/unit and up to 400 units More than 400 units %5.80/unit Write a program to calculate the electricity bill taking consumer's name and units consumed as inputs. Dif} the output. “« = = » Prev Exercises Chapters NextCer = whe krpledse Question 4 A private Cab service company provides service within the city at the following rates: NON AC AC CAR CAR Upto 5 %150/- %120/- KM Beyond5 10/- %08/- KM PER KM PER KM Design a class CabService with the following description: Member variables /data members: String car_type — To store the type of car (AC or NON AC) re Exercises Chapters Next double km — To store the kilome' travelledQuestion 11 Write a menu driven program to calculate: 1. Area of a circle = p*r2, where p = (22/7) 2. Area of a square = side*side 3. Area of a rectangle = length*breadth Enter 'c' to calculate area of circle, 's' to calculate area of square and 'r' to actesiieas sees 2 Bree see esSn Define a class named Customer with the following description: Instance variables /Data members: String cardName — Name of the card holder. long cardNo — Card Number. char cardType — Type of card, 'P' for Platinum, 'G' for Gold, 'S' for Silver. double purchaseAmount — The amount of purchase done on card. double cashback — The amount of cashback received. Member methods: Ciletamar(Ctring name Inna nim char8:50em Oo GO tS Gl 4 52% x @ www.knowledgeboat.com < = Whe kryredse char cardType — Type of card, 'P' for Platinum, 'G' for Gold, 'S' for Silver. double purchaseAmount — The amount of purchase done on card. double cashback — The amount of cashback received. Member methods: Customer(String name, long num, char type, double amt) — Parameterised constructor to initialize all data members. void compute() — To compute the cashback based on purchase amount as follows: 1. For Silver ('S'), 2% of purchase Me = = m1 Prev Exercises Chapters Next Q Search...8:50em Oe O tS Ga 852% x @ www.knowledgeboat.com < = Whe kryredse 1. For Silver ('S'), 2% of purchase amount 2. For Gold ('G'), 5% of purchase amount 3. For Platinum ('P'), 8% of purchase amount void display() — To display the details in the below format: Card Holder Name: Card Number: Purchase Amount: Cashback: Write a main method to input the card details from the user then create object of the class and call the m| r methods with the provided details. Prev Exercises Chapters Next Q Search...8:52 oo OrF Gl 51% x @ www.knowledgeboat.com < = woe Star mall is offering discount on various types of products purchased by its customers. Following table shows different type of products and their respective code along with the discount offered. Based on the code entered, the mall is calculating the total amount after deducting the availed discount. Create a program to calculate total amount to be paid by the customer. Item Item Code Discount Laptop L 5% LCD D Th XBox x 10% Printer =P 11% Anasrnn “« = = ” Prev Exercises Chapters Next. Q Search... ® = a a = Ttime as per the following table: | Number of days jate | Magazines fine 5 Up to 5 days Rs.1 6 to 10 days 11 to 15 days Iterative Constructs in Java 16 to 20 days | chaptorto More than 20 days Rs. 6 Nested for loops : ‘Chapter 1 Tee a cor: of days late and type of book — 'M' for Magazine and . hope ta ee i Answer
You might also like
Bharat Intern Completion Certificate
PDF
0% (1)
Bharat Intern Completion Certificate
1 page
Icse J: ICSE Class 10 Computer Applications (Java) 2009 Solved Question Paper
PDF
No ratings yet
Icse J: ICSE Class 10 Computer Applications (Java) 2009 Solved Question Paper
14 pages
Pratice Sheet Java - If Switch
PDF
No ratings yet
Pratice Sheet Java - If Switch
4 pages
Constructors and Class&Objects
PDF
No ratings yet
Constructors and Class&Objects
6 pages
INDEX
PDF
No ratings yet
INDEX
28 pages
X - Classes and Objects 1-4
PDF
No ratings yet
X - Classes and Objects 1-4
4 pages
Computer Applications 2020
PDF
No ratings yet
Computer Applications 2020
6 pages
c10 Methods
PDF
No ratings yet
c10 Methods
4 pages
Project Work Class - 9 Computer Applications: Hint: No. of Share (Annual Dividend 100) / (Nominal Value
PDF
0% (2)
Project Work Class - 9 Computer Applications: Hint: No. of Share (Annual Dividend 100) / (Nominal Value
7 pages
Computer Assignment List
PDF
No ratings yet
Computer Assignment List
4 pages
Solve The Following Problems Using Java Programs
PDF
No ratings yet
Solve The Following Problems Using Java Programs
3 pages
ISC Computer Project 2019-20 2
PDF
0% (2)
ISC Computer Project 2019-20 2
137 pages
Computer_Assignment - Part I
PDF
No ratings yet
Computer_Assignment - Part I
12 pages
Worksheet Class9 CTS
PDF
No ratings yet
Worksheet Class9 CTS
2 pages
Rupsha CoP
PDF
No ratings yet
Rupsha CoP
26 pages
Practical
PDF
No ratings yet
Practical
4 pages
Diksha CoP
PDF
No ratings yet
Diksha CoP
26 pages
Project Work(Computer Application) for Class-10(Science)
PDF
No ratings yet
Project Work(Computer Application) for Class-10(Science)
20 pages
Dhananjay Upadhyay
PDF
No ratings yet
Dhananjay Upadhyay
40 pages
Practical Programs-Set 1 (Class 10)
PDF
No ratings yet
Practical Programs-Set 1 (Class 10)
5 pages
ITCS 111 Final S2 2016 - 2017 - Key
PDF
No ratings yet
ITCS 111 Final S2 2016 - 2017 - Key
6 pages
First Term Examination-2018 Max. Time: 2 Hrs
PDF
No ratings yet
First Term Examination-2018 Max. Time: 2 Hrs
3 pages
Class 10 Project
PDF
No ratings yet
Class 10 Project
2 pages
Class 10 Computer Project Solve 2022
PDF
No ratings yet
Class 10 Computer Project Solve 2022
25 pages
Diya Cop
PDF
No ratings yet
Diya Cop
26 pages
Second Assignment Class IX
PDF
No ratings yet
Second Assignment Class IX
1 page
Biodata
PDF
No ratings yet
Biodata
30 pages
2017
PDF
No ratings yet
2017
18 pages
Assignment - II Basic Java Programming
PDF
No ratings yet
Assignment - II Basic Java Programming
14 pages
Nishanth X D Computer Applications Home Test
PDF
No ratings yet
Nishanth X D Computer Applications Home Test
11 pages
Akshara Senthil 10B Computer Record Final
PDF
No ratings yet
Akshara Senthil 10B Computer Record Final
58 pages
Review_Test_on_Programs_Assessment_1
PDF
No ratings yet
Review_Test_on_Programs_Assessment_1
2 pages
ITCS 111 Final S1 2016 - 2017
PDF
No ratings yet
ITCS 111 Final S1 2016 - 2017
6 pages
Ch#11 Constructors
PDF
No ratings yet
Ch#11 Constructors
15 pages
2019
PDF
No ratings yet
2019
19 pages
L1 Practice
PDF
No ratings yet
L1 Practice
2 pages
2023table
PDF
No ratings yet
2023table
7 pages
Computer Project Work 2022 (Autorecovered)
PDF
No ratings yet
Computer Project Work 2022 (Autorecovered)
58 pages
Computer Project
PDF
No ratings yet
Computer Project
50 pages
Javaquestionbankcls8
PDF
No ratings yet
Javaquestionbankcls8
5 pages
Lab Report-1
PDF
No ratings yet
Lab Report-1
34 pages
CHAPTER_CONSTRUCTOR_CLASS_X
PDF
No ratings yet
CHAPTER_CONSTRUCTOR_CLASS_X
32 pages
Academic Year: 2021 - 2022 Examination: Initiation Month: JULY 2021 Class: 10 Maximum Marks: 100
PDF
No ratings yet
Academic Year: 2021 - 2022 Examination: Initiation Month: JULY 2021 Class: 10 Maximum Marks: 100
6 pages
9 project
PDF
No ratings yet
9 project
5 pages
Computer Project Isc Class 11 1st Term
PDF
No ratings yet
Computer Project Isc Class 11 1st Term
49 pages
Isc Project
PDF
No ratings yet
Isc Project
30 pages
Computer Application Examination: (Email ID:)
PDF
No ratings yet
Computer Application Examination: (Email ID:)
3 pages
861 Cta1 - 2020
PDF
No ratings yet
861 Cta1 - 2020
6 pages
class as basis of object computation
PDF
No ratings yet
class as basis of object computation
21 pages
PDF Document
PDF
No ratings yet
PDF Document
6 pages
ICSE Computer Solved Paper 2019
PDF
No ratings yet
ICSE Computer Solved Paper 2019
5 pages
File Assignment 1. Chap Functions
PDF
No ratings yet
File Assignment 1. Chap Functions
7 pages
Blue J - Prg. Series - 1
PDF
No ratings yet
Blue J - Prg. Series - 1
58 pages
Adobe Scan 02 Jul 2023
PDF
No ratings yet
Adobe Scan 02 Jul 2023
3 pages
Class 10 Java Paper 2019
PDF
No ratings yet
Class 10 Java Paper 2019
18 pages
Chapter 2 Elementary Programming: Class, Public, Int
PDF
No ratings yet
Chapter 2 Elementary Programming: Class, Public, Int
5 pages
Homework PDF
PDF
No ratings yet
Homework PDF
3 pages
Arjun Computer Project
PDF
No ratings yet
Arjun Computer Project
33 pages
Class - IX Computer Application Project 2024 -25-1
PDF
No ratings yet
Class - IX Computer Application Project 2024 -25-1
5 pages
PCB
PDF
No ratings yet
PCB
17 pages
Three Phase Induction Motor-converted (2)
PDF
No ratings yet
Three Phase Induction Motor-converted (2)
11 pages
Paper_Template (1)
PDF
No ratings yet
Paper_Template (1)
5 pages
internship2
PDF
No ratings yet
internship2
1 page
1737121689_fe83a06d27_8_irjiet (1)
PDF
No ratings yet
1737121689_fe83a06d27_8_irjiet (1)
4 pages
iot
PDF
No ratings yet
iot
1 page
pyq 2024 all sub (2)
PDF
No ratings yet
pyq 2024 all sub (2)
10 pages
6th Sem DETCE (43)
PDF
No ratings yet
6th Sem DETCE (43)
29 pages
Document 11
PDF
No ratings yet
Document 11
32 pages
Wa0001
PDF
No ratings yet
Wa0001
1 page
JavaScript Handwritten Notes
PDF
No ratings yet
JavaScript Handwritten Notes
50 pages