https://github.com/codingnaveen46/car-_service
https://github.com/codingnaveen46/car-_service
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/codingnaveen46/car-_service
- Owner: Codingnaveen46
- Created: 2023-04-06T02:32:10.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-06T03:00:12.000Z (about 3 years ago)
- Last Synced: 2025-02-15T20:57:42.261Z (over 1 year ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# car-_service
Question 1:
Write a program that takes as input an array of positive and negative numbers (0 excluded).
Objective:
return those items from the array whose sum is 0.
If no such items exist return “No Elements found”
Example: For an input array [-4, 1, 3, -2, -1],
one of the possible results would be 3, -2, -1
since their sum is 0.
Note: If there are more than 1 combination of such items, you can return any 1 of them.
specify the Time complexity (Big O notation) and Space complexity (Big O notation) for your solution as well as all possible test cases.
////////////////////////////////////////////////////////////////////////////////////////////////
Question 2:
Car service station using Object Oriented Programming
The car service station caters to different types of cars – Hatchback, Sedan, SUV.
types of services :
Basic Service, Engine Fixing, Clutch Fixing, Gear Fixing and Brake Fixing.
Service Code
Service
Hatchback - ₹
Sedan - ₹
SUV - ₹
BS01
Basic Servicing
2000
4000
5000
EF01
Engine Fixing
5000
8000
10000
CF01
Clutch Fixing
2000
4000
6000
BF01
Brake Fixing
1000
1500
2500
GF01
Gear Fixing
3000
6000
8000
Ojective:
Detailed bill based on service.
Example:
Type of Car – Hatchback
Service Codes – BS01, EF01
Charges for Basic Servicing – ₹ 2000
Charges for Engine Fixing – ₹ 5000
Total Bill – ₹ 7000
In addition, if the total service bill is more than ₹ 10000, a complimentary cleaning should be provided and specified in the bill.