OUTPUT:
Information about person 1:
Name: Alice
Age: 30
Information about person 2:
Name: Bob
Age: 25
OUTPUT:
Constructor called for Student: Alice
Constructor called for Student: Bob
Constructor called for Student: Charlie
Name: Alice, Roll Number: 1
Name: Bob, Roll Number: 2
Name: Charlie, Roll Number: 3
End of program.
Destructor called for Student: Alice
Destructor called for Student: Bob
Destructor called for Student: Charlie
OUTPUT:
Savings Account created for Alice with initial deposit:
$1000.0
Fixed Deposit Account created for Bob with initial deposit:
$5000.0 for tenure: 5 years.
Current Account created for Charlie associated with
business: Tech Solutions Ltd.
OUTPUT
This is a vehicle.
This is a car.
This is an electric car.
This is a vehicle.
GPS is enabled.
Music is playing.
OUTPUT:
Name: Alice
Employee ID: 101
Salary: $5000.0
Name: Bob
Employee ID: 102
Salary: $2400.0
OUTPUT:
Data written to file: simple_example.txt
Reading data from file: simple_example.txt
Hello, this is a simple I/O Streams demo.
OUTPUT
Implicit Conversions:
int to long: 100
long to float: 100.0
Explicit Conversions:
double to int: 100
String to Primitive Conversion:
String to int: 123
Primitive to String Conversion:
int to String: 456
Char to int Conversion:
char to int: 65
int to Char Conversion:
int to char: B
Boolean Conversion:
boolean to String: true
String to boolean: true
Byte to int and vice versa:
byte to int: 10
int to byte: 10
OUTPUT
Bank Account Menu:
1. Deposit
2. Withdraw
3. Check Balance
4. Exit
Enter your choice (1-4): 1
Enter amount to deposit: 500
Deposited 500.0. New balance is 1500.0.
Bank Account Menu:
1. Deposit
2. Withdraw
3. Check Balance
4. Exit
Enter your choice (1-4): 2
Enter amount to withdraw: 2000
Error: Insufficient funds for this withdrawal.
Bank Account Menu:
1. Deposit
2. Withdraw
3. Check Balance
4. Exit
Enter your choice (1-4): 3
Current balance: 1500.0
Bank Account Menu:
1. Deposit
2. Withdraw
3. Check Balance
4. Exit
Enter your choice (1-4): 4
Exiting the program.
OUTPUT
SERVER-SIDE OUTPUT
Server started, waiting for client connection...
Client connected: /[Link]
Received from client: Hello, Server!
CLIENT -SIDE OUTPUT
Enter a message for the server: Hello, Server!
Server response: Hello from server! You said: Hello,
Server!
OUTPUT
Connected to the database successfully!
Table created successfully!
3 rows inserted.
Employee Details:
ID: 1, Name: Alice, Position: Manager, Salary: 75000.00
ID: 2, Name: Bob, Position: Developer, Salary: 60000.00
ID: 3, Name: Charlie, Position: Analyst, Salary: 50000.00
OUTPUT
------------------------------------------------------------
| Temperature Converter |
------------------------------------------------------------
| Enter Temperature: |[ 0 ] |
| |
| Conversion Type: | [ Celsius to Fahrenheit ▼ ] |
| |
| [ Convert ] [ Clear ] |
| |
| Result: |[ 32.00 ] |
------------------------------------------------------------