Monday, 12 August 2019

How To Find Your Computer Science Project Topic For Nigerian Students


Nigerian students at tertiary institutions often face the dilemma of choosing a project topic for their final year project thesis. Computer Science is a vast field that have touched virtually every aspect of our life, hence there are more than enough problems waiting to be solved by computer science students. In this post I will tell you about ways you can follow to choose your nice project topic.
It’s obvious to everyone in the Computer Science departments of Nigerian tertiary institutions that final year topic or problem to be solved were mostly taken and solved, which leave the coming students with few choices. However, that’s not really true as there are numerous problems which can be solved which students are not well aware of. Computer Science students have two options when it comes to final year project, which are
  • Improve on existing project works already done by other students
  • Create entirely different project (i.e. new idea)

The first one is quite simple as it doesn’t involve much critical thinking, all a student has to do is to find a project that is done by other students, examine it and find out its limitations and create your project upon that with the new features implemented. For instance, take a hospital system for example, which to my belief is among the most projects being done by final year students, if you take the project and examine it you will see a lot of features that were left out by the first student, you can create your project to implement some or all of the features you found not be included in the project. All you have to do is explain to your supervisor that you are not plagiarizing other works but rather you improving the work.
Finding new idea to implement for your project involve critical thinking; to find a problem that is worth solving and which has not been solved before. Your new project topic must be beneficial to some part of society. To find a topic for your new project, you should start by looking at your immediate environment to see if there is a problem that can be solved by computers, take for example that store owner near your home, what are his problems? He may tell you product/stock management or listing out products to buy before going to the market, that’s your statement of problem, you will create your project around it. Another instance is you have to look at people/society find something that people do, and look for a way that you can automate it, let’s say that you find out that there is some local raw material in your area that attract buyers from near and far, you can ease the process by creating a system that allow people to order the local material found in your area, you can act as the site administrator which is essentially a middleman, you can explain to your supervisor that the idea might even be an opportunity for you to earn your living.
Final Year project is not an easy task, hence the reason some people pay other professionals to do it for them and then teach them, which is inappropriate. Whatever way you choose to conduct your final year project, either improving already made projects or finding a new idea and building something on it, you must make sure that your work is impressive and also productive, you shouldn’t create a project that add more complexity to a problem just for the idea of automating it.

Thursday, 29 June 2017

SIMPLE COMMAND LINE INTERFACE ADDITION CALCULATOR IN 10 DIFFERENT PROGRAMMING LANGUAGES

Below is the code in 10 different programming languages (Java, C++, Python, Ruby, C#, Lua, Go, C, JavaScript and PHP) of an addition calculator that runs from Command Line Interface (CLI). In all the languages except JavaScript, the user will provide the operands.

JAVA

import java.util.Scanner;

public class Addition{
 public static void main(String args[]){
  //declare variables
  int firstNumber, secondNumber, sum;
 
  //declare Scanner object for getting input values
  Scanner input = new Scanner(System.in);
 
  //get the first number
  System.out.print("Enter First Number: ");
  firstNumber = input.nextInt();
 
  //get the second number
  System.out.print("Enter Second Number: ");
  secondNumber = input.nextInt();
 
  //compute the result
  sum = firstNumber + secondNumber;
 
  //display the result
  System.out.println("the sum of " + firstNumber + " and "
       + secondNumber + " is " + sum);
 }

}

C++

#include <iostream>

using namespace std;

int main(){
 //declare variables
 int firstNumber, secondNumber, sum;

 //get the first nyumber
 cout << "Enter First Number: ";
 cin >> firstNumber;

 //get the second number
 cout << "Enter Second Number: ";
 cin >> secondNumber;

 //compute the result
 sum = firstNumber + secondNumber;

 //display the result
 cout << "the sum of " << firstNumber << " and " << secondNumber << " is " << sum << endl;

 return 0;

}

PYTHON

#get the first nyumber
firstNumber = input("Enter First Number: ")

#get the second nyumber
secondNumber = input("Enter Second Number: ");

#wrap the numbers to integer and compute the result
total = int(firstNumber) + int(secondNumber)

#display the result
print("the sum of ", firstNumber, " and ", secondNumber, " is ", total);

RUBY

print "Enter First Number: "
firstNumber = gets.chomp #get the first number and remove the newline character

print "Enter Second Number: "
secondNumber = gets.chomp #get the second number and remove the newline character

#compute the result after converting the user inputed numbers to integer
sum = firstNumber.to_i + secondNumber.to_i

#display the result
print "the sum of " + firstNumber.to_s + " and " + secondNumber.to_s + " is " + sum.to_s + "\n"

C#

using System;

class Addition{
 static void Main(){
  //declare string to hold user inputs
  string input;
  //declare integer variavles to hold values
  int firstNumber, secondNumber, sum;
 
  //get the first number
  Console.Write("Enter First Number: ");
  input = Console.ReadLine(); //get user input
  firstNumber = int.Parse(input); //convert user input to integer
 
  //get the second number
  Console.Write("Enter Second Number: ");
  input = Console.ReadLine(); //get user inout
  secondNumber = int.Parse(input); // convert user input to integer
 
  //compute the result
  sum = firstNumber + secondNumber;
 
  //display the result
  Console.WriteLine("the sum of " + firstNumber + " and " + secondNumber
       + " is " + sum);
 }
}

LUA

--get first number
io.write("Enter first number: ")
firstNumber = io.read("*n")

--get second number 
io.write("Enter second Number: ")
secondNumber = io.read("*n")

--calculate the sum
sum = firstNumber + secondNumber
io.write("The sum of ", firstNumber, " and ", secondNumber, " is ", sum, "\n")

GO

package main

import "fmt"

func main(){
 var firstNumber int
 var secondNumber int
 var sum int

 fmt.Print("Enter First Number: ")
 fmt.Scanf("%d", &firstNumber)

 fmt.Print("Enter Second Number: ")
 fmt.Scanf("%d", &secondNumber)

 sum = firstNumber + secondNumber

 fmt.Println("the sum of ", firstNumber, " and ", secondNumber, " is ", sum)
}

C

#include <stdio.h>

int main(){
 //declare variables
 int firstNumber, secondNumber, sum;

 //get the first number
 printf("Enter First Number: ");
 scanf("%d", &firstNumber);

 //get the second number
 printf("Enter Second Number: ");
 scanf("%d", &secondNumber);

 //compute the result
 sum = firstNumber + secondNumber;

 //display the result
 printf("the sum of %d and %d is %d", firstNumber, secondNumber, sum);

 return 0;
}

JAVASCRIPT

var firstNumber, secondNumber, sum;

firstNumber = 10;
secondNumber = 22;

sum = firstNumber + secondNumber;

console.log("the sum of " + firstNumber + " and " + secondNumber + " is " + sum);

PHP

<?php
$fp = fopen("php://stdin","r");

//declare variables
$firstNumber = $secondNumber = $sum = 0;

//get the first number
echo "Enter First Number: ";
$firstNumber = rtrim(fgets($fp));

//get the second number 
echo "Enter Second Number: ";
$secondNumber = rtrim(fgets($fp));

//compute the result
$sum = $firstNumber + $secondNumber;

//display the result 
print("the sum of ".$firstNumber." and ".$secondNumber." is ".$sum."\n");


?>

Tuesday, 14 June 2016

DID YOU KNOW?


  1. The first Computer Programmer is a woman(Ada Lovelace).
  2. The first computer virus appears in 1981; its name was Elk Cloner. The virus spread through Apple II floppy disks.
  3. The Windows operating system use backslash in its directory hierarchy, while Unix and other Unix-Like operating systems use the forward slash in their directory hierarchy.
  4. Charles Babbage's difference engine brought the first concept of programmable computer.
  5. PHP is the most used server-side programming language.
  6. The word "Hacker" is used to call computer enthusiasts in the early days of computers. But it is now used universally as a synonym for a computer criminal.
  7. Python programming language has no switch statement found in most programming languages.
  8. www.google.com is the most visited website in the world, followed by www.facebook.com
  9. Java Programming Language was first named Oak.
  10. The goto keyword, though present in many High-Level programming languages, it is rarely used.
  11. The Morris worm is believed to be the first computer virus to be spread on the internet.
  12. Bill Gates learn to program computers when he was 13 years old. 
  13. Java and JavaScript are not related in any way, except that they are both programming languages with C-like syntax. 
  14. A computer does not need to be electronic. 
  15. Array index in Fortran start from 1 instead of 0 like in most programming languages.
  16. It is estimated that there are over 2 billion individuals connected to the internet. 
  17. Apple cofounder Steve Jobs and Facebook founder Mark Zuckerberg are both college dropouts.
  18. Apple and Google were all started in a garage.
  19. JavaScript is also called ECMAScript.
  20. The first computer bug was an actual bug(insect).

Tuesday, 18 August 2015

SOME PROGRAMMING LANGUAGES WITH THE YEAR THEY WERE CREATED, THE PEOPLE WHO CREATE THEM AND THE PURPOSE OF THEIR CREATION


Programming LanguageYear CreatedCreator(s)Purpose of Creation
Java1995James GoslingGeneral Purpose programming language, used to create many variety of application for different computing platforms.
C++1983Bjarne StroustrupGeneral purpose programming language, used to create large programs and performance critical systems.
C1972Dennis RitchieGeneral Purpose programming language, but mostly used today for system programming.
Python1991Guido Van RossumGeneral Purpose but mostly used for research and scientific programming.
PHP1995Rasmus LerdorfWeb scripting language, used to create scripts that run on web server.
Ruby1995Yukihiro MatsumotoGeneral Purpose programming language Can be used in Web Development.
Lisp1958John McCarthyArtificial Intelligence.
Clojure2007Rich HickeyGeneral Purpose programming with tight Java Integration.
Visual Basic1991Microsoft Corp., Alan Cooper created the drag and drop design.Creating GUI applications for Windows.
C#2000Microsoft Corp. with Anders Hejlsberg as chief designer.Creating general applications for Windows Operating System.
Lua1993Roberto LerusalimschyUsed as scripting language by Game Programmers.
Perl1987Larry WallGeneral Purpose programming language, used as glue language in tying different systems.
MATLAB1984MathWorksNumerical Computing.
Fortran1957John BackusNumerical Computing.
COBOL1959Howard Bromberg, Howard Discount, Vernon Reeves, Jean E. Sammet, William Selden and Gertrude Tierney.Business Applications.
Pascal1970Niklaus WirthAcademic Fields
Tcl1988John OusterhoutRapid prototyping and embedded systems.
F#2005Don SymeMostly used as cross-platform CLI language.
JavaScript1995Brendan EichCreating scripts that run on client browser.
Erlang1986EricssonMostly used for concurrent programming.
Objective-C1983Brad Cox and Tom LoveCreating application iOS and OS X

Wednesday, 27 May 2015

WHICH ONE SHOULD I LEARN FIRST BETWEEN C AND C ++?

This question is very nice, it is like someone who is aspiring to be a car driver asking should he start learning car on his own or should he go to Driving School. Here, learning car on your own means learning C++ while going to driving school means learning C. However, it all depends on how prepared you are.

C and C++ are two popular and powerful programming languages that you can use to create much kind of applications, while the former is easier the latter is more powerful. Some programmers recommend learning C before C++ as it helps someone to have insight of the more difficult C++. However, some programmers recommend taking bull by the horn and just going for C++. 

The support of Object-Oriented Programming is what makes C++ more powerful than C, and you can create almost anything with C++ that is written in C. The power of C comes from the ability of the language to interact easily with hardware. Hence, C is almost mainly used today to write applications that are very close to the hardware and to program Embedded Systems like Traffic Light, MP3 Players, and Smart Watches etc.

As I said earlier it all depends on how prepared you are and why do you want to learn one of the two languages. If you want to learn all the two I recommend you start with C first then move to C++.



C++ UNIT CONVERTER

Below is the Source Code of a C++ Unit Converter I wrote couple of weeks ago. I use Object-Oriented approach in creating the converter, and it is also not a GUI app it runs on command prompt.

The first source code is the header file; the class that contains all the conversion functions is defined in the header file.


The Header File

class unit_conversion{
public:
double secondToMinute(double x);
double minuteToSecond(double x);
double secondToHour(double x);
double hourToSecond(double x);
double minuteToHour(double x);
double hourToMinute(double x);
double meterToKilometer(double x);
double kilometerToMeter(double x);
double hectToSqmet(double x);
double sqmetToHect(double x);
double acreToSqmet(double x);
double sqmetToAcre(double x);
double celToFah(double x);
double fahToCel(double x);
double kelToCel(double x);
double celToKel(double x);
double meterToYard(double x);
double yardToMeter(double x);
double meterToInch(double x);
double inchToMeter(double x);
double mileToKilometer(double x);
double kilometerToMile(double x);
double literToGallon(double x);
double gallonToLiter(double x);
double literToCube(double x);
double cubeToLitre(double x);
double literToPint(double x);
double pintToLiter(double x);
double literToGill(double x);
double gillToLiter(double x);
double kilogramToTonne(double x);
double tonneToKilogeam(double x);
double kilogramToOunce(double x);
double ounceToKilogram(double x);
double kilogramToPound(double x);
double poundToKilogram(double x);
double kilogramToSlug(double x);
double slugToKilogram(double x);

private:
//double input;

};

double unit_conversion::secondToMinute(double x){
return x/60;
}

double unit_conversion::minuteToSecond(double x){
return x * 60;
}

double unit_conversion::secondToHour(double x){
return x/3600;
}

double unit_conversion::hourToSecond(double x){
return x * 3600;
}

double unit_conversion::minuteToHour(double x){
return x/60;
}

double unit_conversion::hourToMinute(double x){
return x * 60;
}

double unit_conversion::meterToKilometer(double x){
return x/1000;
}

double unit_conversion::kilometerToMeter( double x){
return x * 1000;
}

double unit_conversion::hectToSqmet(double x){
return x * 10000;
}

double unit_conversion::sqmetToHect(double x){
return x/10000;
}

double unit_conversion::acreToSqmet(double x){
return x * 4046.856422;
}

double unit_conversion::sqmetToAcre(double x){
return x/4046.856422;
}

double unit_conversion::celToFah(double x){
return (x * 9/5) + 32;
}

double unit_conversion::fahToCel(double x){
return (x - 32) * 5/9;
}

double unit_conversion::kelToCel(double x){
return x - 273.15;
}

double unit_conversion::celToKel(double x){
return x + 273.15;
}

double unit_conversion::meterToYard(double x){
return x / 0.9144;
}

double unit_conversion::yardToMeter(double x){
return x * 0.9144;
}

double unit_conversion::meterToInch(double x){
return x / 0.0254;
}

double unit_conversion::inchToMeter(double x){
return x * 0.0254;
}

double unit_conversion::mileToKilometer(double x){
return x / 0.62137;
}

double unit_conversion::kilometerToMile(double x){
return x * 0.62137;
}

double unit_conversion::literToGallon(double x){
return x / 4.546; // gallon is in UK conversion
}

double unit_conversion::gallonToLiter(double x){
return x * 4.546;  // gallon is in UK conversion
}

double unit_conversion::literToCube(double x){
return x / 1000;
}

double unit_conversion::cubeToLitre(double x){
return x * 1000;
}

double unit_conversion::literToPint(double x){
return x / 0.568; //pint is in UK Conversion
}

double unit_conversion::pintToLiter(double x){
return x * 0.568; //pint is in UK Conversion
}

double unit_conversion::literToGill(double x){
return x / 0.142;
}

double unit_conversion::gillToLiter(double x){
return x * 0.142;
}

double unit_conversion::kilogramToTonne(double x){
return x / 1000;
}

double unit_conversion::tonneToKilogeam(double x){
return x * 1000;
}

double unit_conversion::kilogramToOunce(double x){
return x / 0.0283495;
}

double unit_conversion::ounceToKilogram(double x){
return x * 0.0283495;
}

double unit_conversion::kilogramToPound(double x){
return x / 0.45;
}

double unit_conversion::poundToKilogram(double x){
return x * 0.45;
}

double unit_conversion::kilogramToSlug(double x){
return x / 14.6;
}

double unit_conversion::slugToKilogram(double x){
return x * 14.6;

}


The Main Program Source File

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include "conversion.h"

using namespace std;

int user_selection = 99;
double value;

int main(){

unit_conversion converter;

cout << "THE UNIT CONVERTER" << endl;
while (user_selection != 0)
{
cout << "\n";
cout << "Enter 1 For Time Conversion\n";
cout << "Enter 2 For Area Conversion\n";
cout << "Enter 3 For Temperature Conversion\n";
cout << "Enter 4 For Volume Conversion\n";
cout << "Enter 5 For Length Conversion\n";
cout << "Enter 6 For Mass Conversion\n";
cout << "Enter 0 To Exit\n";
cin >> user_selection;

if(user_selection == 1)//Time Conversion Block
{
system("CLS");
cout << '\n';

while(user_selection != 9)
{
cout << "Enter 1 For Second To Minute\n";
cout << "Enter 2 For Minute To Second\n";
cout << "Enter 3 For Second To Hour\n";
cout << "Enter 4 For Hour To Second\n";
cout << "Enter 5 For Minute To Hour\n";
cout << "Enter 6 For Hour To Minute\n";
cout << "Enter 9 To Go Back\n";
cin >> user_selection;

if(user_selection == 1) 
{
cout << "Enter The Second(s): ";
cin >> value;
cout << value << " Second(s) is " << converter.secondToMinute(value) << " Minute(s) " << endl;
}
else if(user_selection == 2)
{
cout << "Enter The Minutes(s): ";
cin >> value;
cout << value << " Minute(s) is " << converter.minuteToSecond(value) << " Second(s) " << endl;
}
else if(user_selection == 3)
{
cout << "Enter The Second(s): ";
cin >> value;
cout << value << " Second(s) is " << converter.secondToHour(value) << " Hour(s) " << endl;
}
else if(user_selection == 4)
{
cout << "Enter The Hour(s): ";
cin >> value;
cout << value << " Hour(s) is " << converter.hourToSecond(value) << " Second(s) " << endl;
}
else if(user_selection == 5)
{
cout << "Enter The Minute(s): ";
cin >> value;
cout << value << " Minute(s) is " << converter.minuteToHour(value) << " Hour(s) " << endl;
}
else if (user_selection == 6)
{
cout << "Enter The Hour(s): ";
cin >> value;
cout << value << " Hour(s) is " << converter.hourToMinute(value) << " Minute(s) " << endl;
}
}
}
else if(user_selection == 2) // Area Conversion Block
{
while(user_selection != 9)
{
cout << "Press 1 For Hectare To Square Meter \n";
cout << "Press 2 For Square Meter To Hectare \n";
cout << "Enter 3 For Acre to Square Meter \n";
cout << "Enter 4 For Square Meter To Acre \n";
cout << "Enter 9 To Go Back\n";
cin >> user_selection;
if(user_selection == 1)
{
cout << "Enter The Hectare(s): ";
cin >> value;
cout << value << " Hectare(s) is " << converter.hectToSqmet(value) << " Square Meter(s) " << endl;
}
else if(user_selection == 2)
{
cout << "Enter The Square Meter(s): ";
cin >> value;
cout <<  value << " Square Meter(s) is " << converter.sqmetToHect(value) << " Hectare(s) " << endl;
}
else if (user_selection == 3)
{
cout << "Enter The Acres(s): ";
cin >> value;
cout << value << " Acre(s)  " << converter.acreToSqmet(value) << " Square Meter(s) " << endl;
}
else if(user_selection == 4)
{
cout << "Enter The Square Meter(s): ";
cin >> value;
cout << value << " Square Meter(s) is " << converter.sqmetToAcre(value) << " Acre(s) " << endl;
}
}
}
else if(user_selection == 3) // Temperature Conversion Block
{
while(user_selection != 9)
{
cout << "Enter 1 For Celsius To Fahrenheit \n";
cout << "Enter 2 For Fahrenheit To Celsius \n";
cout << "Enter 3 For Celsius To Kelvin\n";
cout << "Enter 4 For Kelvin To Celsius\n";
cout << "Enter 9 To Go Back\n";
cin >> user_selection;

if(user_selection == 1)
{
cout << "Enter The Celsius: ";
cin >> value;
cout << value << " Celsius is " << converter.celToFah(value) << " Fahrenheit " << endl;
}
else if(user_selection == 2)
{
cout << "Enter The Fahrenheit: ";
cin >> value;
cout << value << " Fahrenheit is " << converter.fahToCel(value) << " Celsius " << endl;
}
else if(user_selection == 3)
{
cout << "Enter The Celsius: ";
cin >> value;
cout << value << " Celsius is " << converter.celToKel(value) << " Kelvin " << endl;
}
else if(user_selection == 4)
{
cout << "Enter The Kelvin: ";
cin >> value;
cout << value << " Kelvin is " << converter.kelToCel(value) << " Celsius " << endl;
}
}
}
else if(user_selection == 4) // Voluume Conversion Block
{
while(user_selection != 9)
{
cout << "Enter 1 For Liter To Gallon\n";
cout << "Enter 2 For Gallon To Liter\n";
cout << "Enter 3 For Liter To Cube\n";
cout << "Enter 4 For Cube To Liter\n";
cout << "Enter 5 For Liter To Pint\n";
cout << "Enter 6 For Pint To Liter\n";
cout << "Enter 7 For Liter To Gill\n";
cout << "Enter 8 For Gill To Liter\n";
cout << "Enter 9 To Go Back\n";
cin >> user_selection;

if(user_selection == 1)
{
cout << "Enter Liter(s): ";
cin >> value;
cout << value << " liter(s) is " << converter.literToGallon(value) << " gallon(s) " << endl;
}
else if(user_selection == 2)
{
cout << "Enter Gallon(s): ";
cin >> value; 
cout << value << " gallon(s) is " << converter.gallonToLiter(value) << " liter(s) " << endl;
}
else if(user_selection == 3)
{
cout << "Enter Liter(s): ";
cin >> value;
cout << value << " liter(s) is " << converter.literToCube(value) << " cube(s) " << endl;
}
else if(user_selection == 4)
{
cout << "Enter Cube(s): "; // Cubic Centimeter
cin >> value;
cout << value << " cube(s) is " << converter.cubeToLitre(value) << " liter(s) " << endl;
}
else if(user_selection == 5)
{
cout << "Enter Liter(s): ";
cin >> value;
cout << value << " liter(s) is " << converter.literToPint(value) << " pint(s) " << endl;
}
else if(user_selection == 6)
{
cout << "Enter Pint(s): ";
cin >> value;
cout << value << " pint(s) is " << converter.pintToLiter(value) << " liter(s) " << endl;
}
else if(user_selection == 7)
{
cout << "Enter Liter(s): ";
cin >> value;
cout << value << " liter(s) is " << converter.literToGill(value) << " gill(s) " << endl;
}
else if(user_selection == 8)
{
cout << "Enter Gill(s): ";
cin >> value;
cout << value << " gill(s) is " << converter.gillToLiter(value) << " liter(s) " << endl;
}
}
}
else if(user_selection == 5) // Length Conversion Block
{
while(user_selection != 9)
{
cout << "Enter 1 For Meter To Kilometer\n";
cout << "Enter 2 For Kilometer To Meter\n";
cout << "Enter 3 For Meter To Yard\n";
cout << "Enter 4 For Yard To Meter\n";
cout << "Enter 5 For Meter To Inch\n";
cout << "Enter 6 For Inch To Meter\n";
cout << "Enter 7 For Mile To Kilometer\n";
cout << "Enter 8 For Kilometer To Mile\n";
cout << "Enter 9 To Go Back\n";
cin >> user_selection;

if(user_selection == 1)
{
cout << "Enter Meter(s): ";
cin >> value;
cout << value << " meter(s) is " << converter.meterToKilometer(value) << " kilometer(s)" << endl;
}
else if(user_selection == 2)
{
cout << "Enter Kilometer(s): ";
cin >> value;
cout << value << " kilometer(s) is " << converter.kilometerToMeter(value) << " meter(s) " << endl;
}
else if(user_selection == 3)
{
cout << "Enter Meter(s): ";
cin >> value;
cout << value << " meter(s) is " << converter.meterToYard(value) << " yard(s) " << endl;
}
else if(user_selection == 4)
{
cout << "Enter Yard(s): ";
cin >> value;
cout << value << " yard(s) is " << converter.yardToMeter(value) << " meter(s) " << endl;
}
else if (user_selection == 5)
{
cout << "Enter Meter(s): ";
cin >> value;
cout << value << " meter(s) is " << converter.meterToInch(value) << " inch(es) " << endl;
}
else if(user_selection == 6)
{
cout << "Enter Inch(es): ";
cin >> value;
cout << value << " inch(es) is " << converter.inchToMeter(value) << " meter(s) " << endl;
}
else if(user_selection == 7)
{
cout << "Enter Mile(s): ";
cin >> value;
cout << value << " mile(s) is " << converter.mileToKilometer(value) << " kilometer(s) " << endl;
}
else if(user_selection == 8)
{
cout << "Enter Kilometer(s): ";
cin >> value;
cout << value << " kilometer(s) " << converter.kilometerToMile(value) << " mile(s) " << endl;
}
}
}
else if(user_selection == 6) // Mass Vonversion Block
{
while(user_selection != 9)
{
cout << "Enter 1 For Kilogram To Tonne\n";
cout << "Enter 2 For Tonne To Kilogram\n";
cout << "Enter 3 For Kilogram To Ounce\n";
cout << "Enter 4 For Ounce To Kilogram\n";
cout << "Enter 5 For Kilogram To Pound\n";
cout << "Enter 6 For Pound To Kilogram\n";
cout << "Enter 7 For Kilogram To Slug\n";
cout << "Enter 8 For Slug To Kilogram\n";
cout << "Enter 9 To Go Back\n";
cin >> user_selection;

if(user_selection == 1)
{
cout << "Enter Kilogram(s): ";
cin >> value;
cout << value << " kilogram(s) is " << converter.kilogramToTonne(value) << " tonne(s) " << endl;
}
else if(user_selection == 2)
{
cout << "Enter Tonne(s): ";
cin >> value;
cout << value << " tonne(s) is " << converter.tonneToKilogeam(value) << " kilogram(s) " << endl;
}
else if(user_selection == 3)
{
cout << "Enter Kilogram(s): ";
cin >> value;
cout << value << " kilogram(s) is " << converter.kilogramToOunce(value) << " ounce(s) " << endl;
}
else if(user_selection == 4)
{
cout << "Enter Ounce(s): ";
cin >> value;
cout << value << " ounce(s) is " << converter.ounceToKilogram(value) << " kilogram(s) " << endl;
}
else if(user_selection == 5)
{
cout << "Enter Kilogram(s): ";
cin >> value;
cout << value << " kilogram(s) is " << converter.kilogramToPound(value) << " pound(s) " << endl;
}
else if(user_selection == 6)
{
cout << "Enter Pound(s): ";
cin >> value;
cout << value << " pound(s) is " << converter.poundToKilogram(value) << " kilogram(s) " << endl;
}
else if(user_selection == 7)
{
cout << "Enter Kilogram(s): ";
cin >> value;
cout << value << " kilogram(s) is " << converter.kilogramToSlug(value) << " slug(s) " << endl;
}
else if(user_selection == 8)
{
cout << "Enter Slug(s): ";
cin >> value;
cout << value << " slug(s) is " << converter.slugToKilogram(value) << " kilogram(s) " << endl;
}
}
}
}
}