Results tagged “CSC234” from I, Curtis

image

Nothing substantial, just making a simple correction for the dropped course.

C# Programming

| | Comments (0)

CSC153, C# Programming has now taken the place of Advanced C++ on my schedule for Fall. It is a new language for me, and it will give me something to work with in Visual Studio (I've always had it, just never really used it). I worry that the course will be just another over-simplified "welcome to blah programming language" course. I know that the first thing that will be required is a simple "hello world" program, but I think that's standard even at graduate level programming courses. I am looking forward to this being a little more event driven than some of my other courses, and perhaps introduce me to something new... maybe even a GUI way of doing things. I have heard many things about C#, everything from it is crap and is slow to being raving about how extensible it is and comments like that. I will now have a chance to decide for myself and develop a true opinion of the language.

Below is the course information:

Schedule: Internet

C# Programming [CSC153]
Eric M. Notheisen
This course introduces computer programming using the C# programming language with object-oriented programming principles. Emphasis is placed on event-driven programming methods, including creating and manipulating objects, classes, and using object-oriented tools such as the class debugger. Upon completion, students should be able to design, code, test, debug, and implement objects using the appropriate environment at the beginning level. -- 3 hours
Registered

Advanced C++ Dropped

| | Comments (0)

Upon checking my course records this morning I found out that CSC234, Advanced C++ has been dropped from the schedule of classes at CPCC. After getting myself so excited about it, I am a little sad that it isn't an option. I am now weighing my options... I could potentially take a C# course. No other interesting languages are offered, but the game development department is still offering their "Intro to Game Programming" course.. but that's not really my thing.

Advanced C++ Intimidation

| | Comments (0)

This evening I ran back over my old assignments from my first attempt at Advanced C++ (CSC234) been rereading the original lab I got stuck on that forced the withdraw (well... that lab and the OTHER 18 credit hours [21 total] I was taking at the time). It was a fairly simple lab, just play with some bank tellers, some customers and a few timers, that's it. A simple, straight forward modeling program. Unfortunately, the lab still scares me and my own original source code makes no sense. I am likely to take a whole different approach to that lab (or whatever has replaced it now) when the course opens, especially having my knowledge of data structures and things now. I feel more prepared than ever to tackle these labs now, mostly because I don't intend to waste time with things and procrastinate before getting them done, so I will have plenty of time to research, get help, etc. I have thought about this course too many semesters to let it get away now. My self-esteem needs to take and pass this course (honestly, I need an A...I have only gotten one non-A at CPCC and it kills me).

Anyway... whatever I do this semester has to be better than this:

//Written by Curtis M. Kularski
//CSC234 - 85
//Lab 02 - Banking Simulation


#include <stdlib.h>
#include <iostream>
#include <iomanip>

using namespace std;

class Teller
{
private: 
    int timer;
    bool isBusy;
    
public: 
    void setTimer(int K)
    {
     timer = 1+rand()%K;
    }

    void decrementTimer()
    {
     timer--;
    }

    int getTimer()
    {
    return timer;
    }
    
    void setBusy(bool busy)
    {
         isBusy = busy;
    }
};



class Customer
{
private:
    int wait;
    int timeInQueue=0;
    bool inQueue;

public: 
    void incrementWait()
    {
      wait++;
      if (inQueue == true)
      {
        timeInQueue++;
      }
    }
    void setTimer()
    {
     wait = 0; 
    }
};


int intializeTellers(int, Teller []);
void createCustomers(int, int, Customer [])
int addCustomers(int);



int main()
{

int i, M, N, K, totalCustomers;
cout << "How many iterations would you like to test? ";
cin >> i;

cout << "\nMaximum customers added per iteration? "; 
cin >> M;


cout << "\nHow many tellers will be working? ";
cin >> N;

cout << "\nWhat is the maximum time a teller spends on a transaction? ";
cin >> K;

cout << "\n\n";

int numCustomers = 0, newCustomers=0, numToRemove = 0, freeTellers;
Teller tellers[N];
initializeTellers(N, tellers);


Customer customers[20];
while (i >=1)
    {
      //Remove Customers who are done
      //Customers enter bank
            newCustomers = addCustomers(M);
            createCustomers(newCustomers, numCustomers, customers);
      //Free tellers are assigned customers, customers removed from queue and tellers isBusy=true, timers set
      //
      

      assignCustomersToTellers(tellers, customers);

   //display 
   
      i--;
      system("pause");
    }

return 0; 
}

 void initializeTellers(int N, tellers [])
 {
  while (N >= 1)
        {
          N--;
          tellers[N].setBusy(false);      
        }
 }


 void createCustomers(int newCustomers, int numCustomers, Customer customers[])
 {
      int j = 0;
      numCustomers--; 
      while (j <= newCustomers)
      {
            if (numCustomers + j + 1 < 20)
            {
             customers[numCustomers + (j+1)].setTimer();
             j++;
            }
            else {cout << "Array Full!"; break;}
      }
  }


int addCustomers(int maxNew)
{
int numToAdd = 1+rand()%maxNew;
return numToAdd;
}