Principles of Procedural Programming Computer Science Essay
Principles of Procedural Programming Computer Science Essay
Conclusively, taking into account that the main characteristics of procedural programing being sequential logic, simplicity, easy
implementation of compilers and interpreters, ability to make use of the same code in the program by calling it instead of copying, ease with
which the program flow can be tracked, ability to be strongly modular or structured, it can definitely be said that procedural programming is
an essential stepping stone towards learning further programming skills.
If Balance is positive display credit amount and if negative display no more funds available.
EXIT
No More Funds Available
using System.Text;
namespace Unit18_CW_ID10571
{
class Program
{
static void Main(string[] args)
{
double monthlySalary, otherIncome, totalIncome,balance;
/
*****************************************************
*****************************************************
***************************
About : This program answers Task 3 of the Coursework for Unit18_Procedural Programming,
BTEC HND in Computing and Systems Development (CSD). Icon College of Technology and Management.
Date : 10.04.2013
By : Ibrahim Khan Mahomudally . Student ID : 10571
Tutor : Y M Gebremichael
*****************************************************
*****************************************************
***************************/
Console.WriteLine(" ****************************************************************************** \n");
Console.WriteLine(" ~~~~~~~~~~~~~~~~~ Profit & Loss Accounting 2013 ~~~~~~~~~~~~~~~~~~~~ ");
Console.WriteLine("\t\t\t\t [Menu]\n\n");
Console.WriteLine("\t\t\t\t 1. Login\n\n");
Console.WriteLine("\t\t\t\t 2. Exit\n\n");
{
// input income
//calculate total income and display
Console.WriteLine("************************* All income***************************************");
Console.WriteLine("Enter Monthly Salary: ");
monthlySalary = double.Parse(Console.ReadLine());
Console.WriteLine("Enter Any Other Income");
otherIncome = double.Parse(Console.ReadLine());
totalIncome = monthlySalary + otherIncome;
Console.WriteLine("Total Income = " + monthlySalary + "+" + otherIncome + "=" + totalIncome);
/
*****************************************************
*************************/
//input expenses
//calculate total expenses and display
Console.WriteLine("************************* All Expenses***************************************");
double totalExpenses, rent, collegeFees, food, travel, entertainment, phonebill, gasbill, electricitybill,
tvlicense, counciltax, clubmembership, charitycontribution, anyotherexpenses;
Console.WriteLine("Enter College fees");
collegeFees = double.Parse(Console.ReadLine());
Console.WriteLine("Enter Rent");
rent = double.Parse(Console.ReadLine());
Console.WriteLine("Enter Food");
food = double.Parse(Console.ReadLine());
Console.WriteLine("Enter Travel");
travel = double.Parse(Console.ReadLine());
Console.WriteLine("Enter Entertainment");
entertainment = double.Parse(Console.ReadLine());
Console.WriteLine("Enter Phone Bill");
phonebill = double.Parse(Console.ReadLine());
Console.WriteLine("Enter Gas Bill");
gasbill = double.Parse(Console.ReadLine());
Console.WriteLine("Enter Electricity Bill");
electricitybill = double.Parse(Console.ReadLine());
Console.WriteLine("Enter TV License");
tvlicense = double.Parse(Console.ReadLine());
Console.WriteLine("Enter Council Tax");
counciltax = double.Parse(Console.ReadLine());
Console.WriteLine("Enter Club Membership");
clubmembership = double.Parse(Console.ReadLine());
Console.WriteLine("Enter Charity Contribution");
charitycontribution = double.Parse(Console.ReadLine());
Console.WriteLine("Enter Any Other Expenses");
anyotherexpenses = double.Parse(Console.ReadLine());
totalExpenses = collegeFees + rent + food + travel + entertainment + phonebill + gasbill +
electricitybill + tvlicense + counciltax + clubmembership + charitycontribution + anyotherexpenses;
{
Console.WriteLine(" :) You Are In Credit by " + balance);
}
else
{
Console.WriteLine(":( No More Funds Available");
}
}
else if (Menu == 2)
{
Environment.Exit(1);
}
else
{
Console.WriteLine("Enter a number from the menu");
// this should return back to the menu again
}
Console.ReadLine()
}
}
}
4| Testing Procedural Programming Solutions.
Below are enclosed screenshots of the above-designed program demonstrating that every aspects of program is tested and compared against
the design specification.