Thursday, March 13, 2025

Visual basic program for shopping mall

 Here is a simple Visual Basic (VB) program for a shopping mall:


Program Description:

This program allows users to:


1. View available products

2. Add products to cart

3. Remove products from cart

4. Calculate total cost

5. Make payment


Code:

```

Imports System.Collections.Generic


Public Class ShoppingMall


    Private products As New List(Of Product)

    Private cart As New List(Of Product)


    Public Sub New()

        ' Initialize products

        products.Add(New Product("Shirt", 20.99))

        products.Add(New Product("Pants", 30.99))

        products.Add(New Product("Shoes", 50.99))

    End Sub


    Public Sub ViewProducts()

        Console.WriteLine("Available Products:")

        For Each product In products

            Console.WriteLine($"{product.Name} - ${product.Price}")

        Next

    End Sub


    Public Sub AddToCart(productName As String)

        For Each product In products

            If product.Name = productName Then

                cart.Add(product)

                Console.WriteLine($"Added {productName} to cart.")

                Return

            End If

        Next

        Console.WriteLine("Product not found.")

    End Sub


    Public Sub RemoveFromCart(productName As String)

        For Each product In cart

            If product.Name = productName Then

                cart.Remove(product)

                Console.WriteLine($"Removed {productName} from cart.")

                Return

            End If

        Next

        Console.WriteLine("Product not found in cart.")

    End Sub


    Public Sub CalculateTotal()

        Dim total As Decimal = 0

        For Each product In cart

            total += product.Price

        Next

        Console.WriteLine($"Total: ${total}")

    End Sub


    Public Sub MakePayment()

        Console.WriteLine("Payment successful.")

        cart.Clear()

    End Sub


End Class


Public Class Product

    Public Property Name As String

    Public Property Price As Decimal


    Public Sub New(name As String, price As Decimal)

        Me.Name = name

        Me.Price = price

    End Sub

End Class


Module Program

    Sub Main()

        Dim mall As New ShoppingMall()


        While True

            Console.WriteLine("Shopping Mall Menu:")

            Console.WriteLine("1. View Products")

            Console.WriteLine("2. Add to Cart")

            Console.WriteLine("3. Remove from Cart")

            Console.WriteLine("4. Calculate Total")

            Console.WriteLine("5. Make Payment")

            Console.WriteLine("6. Exit")


            Dim choice As String = Console.ReadLine()


            Select Case choice

                Case "1"

                    mall.ViewProducts()

                Case "2"

                    Console.Write("Enter product name: ")

                    Dim productName As String = Console.ReadLine()

                    mall.AddToCart(productName)

                Case "3"

                    Console.Write("Enter product name: ")

                    Dim productName As String = Console.ReadLine()

                    mall.RemoveFromCart(productName)

                Case "4"

                    mall.CalculateTotal()

                Case "5"

                    mall.MakePayment()

                Case "6"

                    Exit While

                Case Else

                    Console.WriteLine("Invalid choice. Please try again.")

            End Select

        End While

    End Sub

End Module

```


How to Run:

1. Create a new VB.NET console application project in Visual Studio.

2. Copy and paste the above code into the project.

3. Run the project using F5 or the "Start" button.


Example Use Cases:

1. View available products: Choose option 1 from the menu.

2. Add product to cart: Choose option 2, enter the product name (e.g., "Shirt").

3. Remove product from cart: Choose option 3, enter the product name (e.g., "Shirt").

4. Calculate total cost: Choose option 4.

5. Make payment: Choose option 5.

Earth planet in solar system

 Earth is the third planet from the Sun in our Solar System and the only known planet to support life.


Key Facts:

1. *Diameter*: Approximately 12,742 kilometers (7,918 miles)

2. *Mass*: Approximately 5.97 x 10^24 kilograms

3. *Surface Gravity*: 9.8 meters per second squared (32 feet per second squared)

4. *Atmosphere*: Composed of 78% nitrogen, 21% oxygen, and 1% other gases

5. *Oceans*: Cover approximately 71% of the planet's surface

6. *Continents*: 7 continents: Africa, Antarctica, Asia, Australia, Europe, North America, and South America


Unique Features:

1. *Water*: Earth is the only known planet with liquid water, essential for life.

2. *Magnetic Field*: Protects the planet from harmful solar and cosmic radiation.

3. *Atmospheric Circulation*: Supports weather patterns and climate regulation.

4. *Geological Activity*: Processes like plate tectonics shape the planet's surface.


Habitability:

1. *Temperature Range*: Supports liquid water and life, with temperatures between -89°C and 57°C (-129°F and 135°F).

2. *Organic Compounds*: Presence of carbon-based molecules, building blocks of life.

3. *Energy Sources*: Receives energy from the Sun, supporting photosynthesis and life.


Earth's unique combination of features makes it an ideal haven for life to emerge and thrive.



The rotation of Earth is the movement of our planet on its axis, which is an imaginary line that runs through the North and South Poles.


Key Facts:

1. *Rotation Period*: 23 hours, 56 minutes, and 4 seconds (approximately 24 hours)

2. *Rotation Speed*: 1,674 kilometers per hour (km/h) or 1,040 miles per hour (mph) at the equator

3. *Axis Tilt*: 23.5 degrees relative to the plane of its orbit around the Sun


Effects of Rotation:

1. *Day and Night*: Rotation causes day and night cycles, with the Sun appearing to rise in the east and set in the west.

2. *Time Zones*: The rotation of Earth divides the planet into 24 time zones, each separated by one hour.

3. *Weather Patterns*: Rotation influences global wind patterns, ocean currents, and weather systems.

4. *Equatorial Bulge*: The planet's rotation causes a slight bulge at the equator due to centrifugal force.


Rotation Measurement:

1. *Sidereal Day*: The time it takes Earth to rotate once on its axis relative to the fixed stars (23 hours, 56 minutes, and 4 seconds).

2. *Solar Day*: The time it takes Earth to rotate once on its axis relative to the Sun (24 hours).


Interesting Facts:

1. Earth's rotation is slowing down due to the gravitational pull of the Moon.

2. The planet's rotation has slowed by about 1.8 milliseconds per century.

3. The length of a day on Earth has increased by about 1.78 seconds over the past 620 million years.

Origin of each days of the week

 The days of the week originated from ancient Roman and Germanic cultures, and were named after celestial bodies and ancient gods.


Here's the origin of each day's name:


1. *Sunday*: Named after the Sun (Latin: Dies Solis)

2. *Monday*: Named after the Moon (Latin: Dies Lunae)

3. *Tuesday*: Named after Tiw (Norse god of war and law), equivalent to Mars (Latin: Dies Martis)

4. *Wednesday*: Named after Woden (Norse god), equivalent to Mercury (Latin: Dies Mercurii)

5. *Thursday*: Named after Thor (Norse god of thunder), equivalent to Jupiter (Latin: Dies Iovis)

6. *Friday*: Named after Frigga (Norse goddess), equivalent to Venus (Latin: Dies Veneris)

7. *Saturday*: Named after Saturn (Latin: Dies Saturni)


The Roman names for the days of the week were adopted from the ancient Greeks, who in turn named them after the planets in their solar system.

An overview of our Solar System:

 Here's an overview of our Solar System:


The Sun:

- The center of our Solar System

- A massive ball of hot, glowing gas

- Makes up 99.8% of the Solar System's mass


The 8 Planets:

1. *Mercury*: Closest planet to the Sun, smallest planet

2. *Venus*: Hottest planet, thick atmosphere

3. *Earth*: Only known planet with life, diverse ecosystems

4. *Mars*: Rocky planet, potential for life

5. *Jupiter*: Largest planet, gas giant

6. *Saturn*: Ringed planet, gas giant

7. *Uranus*: Tilted axis, icy planet

8. *Neptune*: Coldest planet, icy giant


Dwarf Planets:

1. *Pluto*: Most well-known dwarf planet

2. *Eris*: Largest dwarf planet

3. *Ceres*: Only dwarf planet in the asteroid belt

4. *Haumea*: Icy dwarf planet

5. *Makemake*: Icy dwarf planet


Other Objects:

1. *Asteroids*: Small rocky objects in the asteroid belt

2. *Comets*: Icy bodies that release gas and dust

3. *Kuiper Belt*: Region of icy bodies beyond Neptune

4. *Oort Cloud*: Distant region of icy bodies surrounding the Solar System


Interesting Facts:

1. The Solar System is about 4.6 billion years old.

2. The Sun loses about 1% of its mass every 100 million years.

3. The fastest planet is Mercury, with an orbital speed of 47,400 km/h.

4. The largest moon is Ganymede, orbiting Jupiter.

Districts of Gujarat

 Here are the 33 districts of Gujarat:


1. *Ahmedabad*

2. *Amreli*

3. *Anand*

4. *Aravalli*

5. *Banaskantha*

6. *Bharuch*

7. *Bhavnagar*

8. *Botad*

9. *Chhota Udaipur*

10. *Dahod*

11. *Dang*

12. *Devbhoomi Dwarka*

13. *Gandhinagar*

14. *Gir Somnath*

15. *Jamnagar*

16. *Junagadh*

17. *Kachchh*

18. *Kheda*

19. *Mahisagar*

20. *Mehsana*

21. *Morbi*

22. *Narmada*

23. *Navsari*

24. *Panchmahal*

25. *Patan*

26. *Porbandar*

27. *Rajkot*

28. *Sabarkantha*

29. *Surat*

30. *Surendranagar*

31. *Tapi*

32. *Vadodara*

33. *Valsad*

List of all the Prime Ministers of India

 Here's a list of all the Prime Ministers of India since independence:


- *1. Jawaharlal Nehru*: August 15, 1947 - May 27, 1964 (Indian National Congress)¹

- *2. Gulzarilal Nanda (acting)*: May 27, 1964 - June 9, 1964 (Indian National Congress)

- *3. Lal Bahadur Shastri*: June 9, 1964 - January 11, 1966 (Indian National Congress)

- *4. Gulzarilal Nanda (acting)*: January 11, 1966 - January 24, 1966 (Indian National Congress)

- *5. Indira Gandhi*: January 24, 1966 - March 24, 1977 (Indian National Congress)

- *6. Morarji Desai*: March 24, 1977 - July 28, 1979 (Janata Party)

- *7. Charan Singh*: July 28, 1979 - January 14, 1980 (Janata Party)

- *8. Indira Gandhi*: January 14, 1980 - October 31, 1984 (Indian National Congress)

- *9. Rajiv Gandhi*: October 31, 1984 - December 2, 1989 (Indian National Congress)

- *10. Vishwanath Pratap Singh*: December 2, 1989 - November 10, 1990 (Janata Dal)

- *11. Chandra Shekhar*: November 10, 1990 - June 21, 1991 (Samajwadi Janata Party)

- *12. P. V. Narasimha Rao*: June 21, 1991 - May 16, 1996 (Indian National Congress)

- *13. Atal Bihari Vajpayee*: May 16, 1996 - June 1, 1996 (Bharatiya Janata Party)

- *14. H. D. Deve Gowda*: June 1, 1996 - April 21, 1997 (Janata Dal)

- *15. Inder Kumar Gujral*: April 21, 1997 - March 19, 1998 (Janata Dal)

- *16. Atal Bihari Vajpayee*: March 19, 1998 - May 22, 2004 (Bharatiya Janata Party)

- *17. Manmohan Singh*: May 22, 2004 - May 26, 2014 (Indian National Congress)

- *18. Narendra Modi*: May 26, 2014 - present (Bharatiya Janata Party) 

Board of Control for Cricket in India (BCCI)

 The Board of Control for Cricket in India (BCCI)!


Overview:

The BCCI is the national governing body for cricket in India. It was established in 1928 and is responsible for promoting and developing the sport of cricket in India.


Key Functions:

1. *Administration*: The BCCI oversees the administration of cricket in India, including the selection of national teams, scheduling of matches, and management of cricket infrastructure.

2. *Tournaments*: The BCCI organizes various domestic and international cricket tournaments, including the Indian Premier League (IPL), Ranji Trophy, and Duleep Trophy.

3. *Player Development*: The BCCI provides training and development opportunities for cricketers, including coaching, mentoring, and scholarship programs.

4. *Infrastructure Development*: The BCCI invests in the development of cricket infrastructure, including stadiums, pitches, and training facilities.


Structure:

1. *President*: The President is the chief executive of the BCCI and is responsible for overall strategy and decision-making.

2. *Secretary*: The Secretary is responsible for the day-to-day administration of the BCCI.

3. *Treasurer*: The Treasurer is responsible for managing the BCCI's finances.

4. *Committees*: The BCCI has various committees, including the Selection Committee, Tournament Committee, and Marketing Committee.


Achievements:

1. *World Cup Wins*: The Indian cricket team has won the ICC Cricket World Cup twice, in 1983 and 2011.

2. *IPL Success*: The IPL, founded by the BCCI in 2008, has become one of the most popular and lucrative T20 leagues in the world.

3. *Cricket Development*: The BCCI has invested heavily in cricket development programs, resulting in a significant increase in participation and talent identification.


Challenges:

1. *Corruption*: The BCCI has faced allegations of corruption, including match-fixing and spot-fixing.

2. *Governance*: The BCCI has faced criticism for its governance structure, including concerns about transparency and accountability.

3. *Financial Management*: The BCCI has faced challenges in managing its finances, including concerns about revenue distribution and expenditure.


Overall, the BCCI plays a vital role in promoting and developing cricket in India, and its efforts have contributed significantly to the sport's growth and popularity in the country.

Program to develop for cost saving in hotel industry

 To develop a program for cost-saving in a hotel, you can consider the following features: Key Features 1. *Room Management*: Optimize room ...