Category Archives: Snippets

Java || Snippet – How To Convert A Decimal Number Into Binary

This page will demonstrate how to convert a decimal number (i.e a whole number) into its binary equivalent. So for example, if

Java || Searching An Integer Array For A Target Value

Here is another actual homework assignment which was presented in an intro to programming class which was used to introduce more practice

Java || Find The Average Using an Array – Omit Highest And Lowest Scores

This page will consist of two programs which calculates the average of a specific amount of numbers using an array. REQUIRED KNOWLEDGE

Java || Display Today’s Date Using a Switch Statement

If statements, char’s and strings have been previously discussed, and this page will be more of the same. This program will demonstrate

Java || Snippet – Custom Setw & Setfill Sample Code For Java

This page will consist of a brief implementation of setw/ios::width and setfill/ios::fill in Java. If you are a C++ programmer, no doubt

C++ || Convert Time From Seconds Into Hours, Min, Sec Format

Here is another simple programming assignment. This page will demonstrate how to convert time from -seconds- into HH::MM::SS (hours, minutes seconds) format.

C++ || Snippet – Doubly Linked List Custom Template Queue Sample Code

This page will consist of sample code for a custom doubly linked list template queue. This implementation is considered a doubly linked

C++ || FizzBuzz – Tackling The Fizz Buzz Test In C++

What is Fizz Buzz? Simply put, a “Fizz-Buzz test” is a programming interview question designed to help filter out potential job prospects

C++ || Snippet – Round A Number To The Nearest Whole Number

This page will display a simple implementation of a function which rounds a floating point number to the nearest whole number. So

C++ || Snippet – How To Find The Minimum & Maximum Of 3 Numbers, Print In Ascending Order

This page will demonstrate how to find the minimum and maximum of 3 numbers. After the maximum and minimum numbers are obtained,

C++ || Snippet – How To Read & Write Data From A User Specified Text File

This page will consist of a demonstration of a simple quadratic formula program, which highlights the use of the input/output mechanisms of

C++ || Snippet – Custom Conio.h Sample Code For Linux

This page will consist of a brief implementation of “conio.h” for Linux. Conio.h is a C header file used in old MS-DOS

C++ || Snippet – Linked List Custom Template Stack Sample Code

This page will consist of sample code for a custom linked list template stack. This page differs from the previously highlighted array

C++ || Printing Various Patterns Using Nested Loops

This page will demonstrate various programs which illustrates the use of nested loops to print selected patterns to the screen. REQUIRED KNOWLEDGE