Could anyone help me with completing this project?

1. In order to demonstrate your understanding of Object Oriented Programming within a visual environment you are required to create an object oriented graphical program to simulate a simple telephone network.

Guidance:

Use a suitable container to store the active phones within the network. You need to consider how each of the separate phones will communicate with each other. One way would be to implement an exchange class to manage the phones.
The exchange and phone(s) should be represented using VB forms. The exchange should manage the creation / removal of phones from your chosen container. A phone should be able to communicate with any another phone on the network.

How do you make the phone ring? You could simulate an incoming call with a flashing light - off when in standby mode and flashing when activated by a call.
You also need to consider what happens if one phone tries to connect to another phone already engaged in a call?


Version 1.0:

Your initial version should: -
• Create new phones within the network
• Remove phones from the network
• Make a call from one phone to another phone within the network
• Answer a call
• Terminate a call

Do this first and get it working before tackling any enhancements.

Version 2.0: Create an enhanced version of the application

An enhanced version of your system will include two different types of phone. A standard phone for voice communication only, and an advanced phone that includes the ability to send simple text messages.

There is scope for various other improvements and enhancements to be implemented efficiently for example, the facility to store and redial numbers. It is left to you to consider this and respond accordingly. Ensure that you highlight any enhancements beyond the specification given. However, do not spend a disproportionate amount of time pursuing this issue. Submit your enhanced version of your network as version 2.0

Dani AI

Generated

A practical way to start is to separate model logic from the UI: build small classes first (an Exchange, a Phone base class, a Call object), unit-test the call flow, then add forms that subscribe to model events to update controls. This keeps the object-oriented design clear and makes the forms thin view/controllers instead of mixing business rules with UI code. As hinted, try a minimal prototype before asking for full solutions; and ’s point about not doing others' homework explains why this note focuses on direction and skeleton code rather than a finished project.

Example VB.NET skeleton (keep models free of WinForms code):

' Phone.vb
Public MustInherit Class Phone
    Public ReadOnly Property Id As Integer
    Public Property State As String
    Public Event IncomingCall(callerId As Integer)
    Public Event CallConnected(calleeId As Integer)

    Public Sub New(id As Integer)
        Me.Id = id
        State = "Idle"
    End Sub

    Public Overridable Sub Dial(targetId As Integer, exch As Exchange)
        exch.Connect(Me.Id, targetId)
    End Sub

    Public Overridable Sub Answer()
        State = "Connected"
        RaiseEvent CallConnected(Nothing)
    End Sub

    Public Overridable Sub HangUp(exch As Exchange)
        exch.Disconnect(Me.Id)
    End Sub
End Class

Implementation tips and gotchas: use a Dictionary(Of Integer, Phone) in Exchange and protect concurrent access with SyncLock. Use events (RaiseEvent / AddHandler) to notify Phone forms of incoming calls; those forms can start a Timer to flash a light and stop it when Answer is called. Check for busy state before creating a Call object and return an error or busy signal. When updating controls from event handlers that may run on non-UI threads, use Control.Invoke or run model events on the UI thread.

Edge cases to implement and test: calling a non-existent ID, calling oneself, removing a phone during an active call (cleanly terminate and notify peer), and a subclass AdvancedPhone that exposes a SendText method. Break the work into small milestones: model, exchange UI, single phone form, multi-phone interaction, then enhancements. and ’s remarks point to the project scope—keep each step small and verifiable.

Recommended Answers

All 4 Replies

Member Avatar for Member #33065

Looks like you need help starting this project not completing it. You shouldn't post anything until you actually have something started yourself.

-- Andy

That's quite the hefty homework assignment.

In order to demonstrate your understanding of Object Oriented Programming within a visual environment...

i have seen an example for this in C++ but with fax
google it

I don't believe in doing homework for people. However, I would like to try my hand at it. Why don't you guys do the same and compare projects in about 2 or 3 weeks. Maybe if they come up with something we can still help them out without doing their homework for them.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.