Flutter Employee Management App: Code Walkthrough and Fixes

Flutter Employee Management Application

The following code sample demonstrates a simple employee management application built with Flutter. It includes pages for adding, showing, searching, updating, and deleting employees, along with a login page and navigation options.

Home Page with Tabs

The first HomePage class uses a DefaultTabController with five tabs: Add, Show, Search, Update, and Delete.

Code Example

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget

Read More

Bubble Sort Algorithm: Loops, Swaps and Early Exit

Bubble Sort must use an outer loop for passes and an inner loop for adjacent comparisons.
Outer Loop
The outer loop controls the passes. After each pass, the largest remaining unsorted value moves to the end of the current unsorted section.
for (int pass = 0; pass < values.length - 1; pass++) {
    // one Bubble Sort pass
}

Inner Loop

The inner loop compares adjacent values. The comparison range becomes shorter after every pass because the values at the end are already sorted.
for (int i = 0; i &

Read More

EECS 3213 Lecture 1: Communication Networks, Switching and Topologies

EECS 3213 — Lecture 1: Introduction

Communication Networks

Communication network: Equipment (computers, routers, switches, modems, servers, software) and facilities (copper, coaxial, fiber, air) that enable information transfer.

  • Direct-link: One physical link with no intermediate devices.
  • Networked: Multiple links and intermediate devices.
  • LAN (Local Area Network): Small area, privately owned, high-speed, resource sharing.
  • WAN (Wide Area Network): Large geographical area, long-distance communication.
Read More

Machine Learning Fundamentals: Overfitting, Bias-Variance and Optimization

a) Define Machine Learning.
Machine Learning is a branch of AI that enables computers to learn from data and make predictions without explicit programming.

b) What is Overfitting in Machine Learning?
Overfitting occurs when a model learns the training data too well, including noise, and performs poorly on new data.

c) What is Underfitting?
Underfitting occurs when a model is too simple to learn the patterns in the data, resulting in poor performance.

d) Define Bias and Variance.

  • Bias: Error caused by overly

Read More

Algorithm Lab Experiments: Sorting, Searching, Greedy, DP and String Matching

Experiment 1: Insertion Sort

Aim: To implement Insertion Sort.

Theory: Insertion sort builds the sorted array one element at a time, like arranging playing cards in your hand. Each element (key) is inserted into its correct place in the already sorted left part by shifting larger elements right. It is stable, in-place and works best on small or nearly sorted data.

Algorithm:

  1. Start.
  2. Read n and the array A.
  3. For i = 2 to n, set key = A[i] and j = i - 1.
  4. While j ≥ 1 and A[j] > key, shift A[j] to A[j+1]
Read More

Binary Trees Explained: Structure, Traversals, Hashing and Sorting

1. Explain Binary Tree

A Binary Tree is a non-linear, hierarchical data structure in which each node can have a maximum of two children, traditionally referred to as the left child and the right child.

Core Structural Components

  • Root Node: The topmost node of the tree with no parent.
  • Leaf Node: A node with no children (degree 0).
  • Internal Node: A node containing at least one child.
  • Subtree: A tree structure formed by a child node and its descendants.

Key Types of Binary Trees

  • Full Binary Tree: Every node
Read More