Skip to content

Instantly share code, notes, and snippets.

@HDI1234
HDI1234 / index.html
Created December 13, 2017 22:54
Food Service Website
<!DOCTYPE HTML>
<!--
Dimension by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<title>HAMP Foods</title>
<meta charset="utf-8" />
@HDI1234
HDI1234 / Passenger.java
Last active August 24, 2017 01:02
Main class to run the program
/**
* Class Passenger
*
* Amirul Naim
* 1.0.0
*/
public class Passenger
{
String name;
int id;
@HDI1234
HDI1234 / Test.java
Last active February 21, 2017 10:18
import java.text.DecimalFormat; //To format the price to two decimal places
public class retailItem{
private String description;
private int unitsOnHand, quantityPurchased; //Fields declared with their respective data type
private double price,subtotal,tax,total;
//Constructor without parameter
retailItem (){
description = "";
import java.util.Scanner;
public class retailItem {
private String description;
private int unitsOnHand, quantityPurchased;
private double price,subtotal,tax,total;
retailItem (String description, int units, double p, int quantity) {
this.description = description;
this.unitsOnHand = units;
@HDI1234
HDI1234 / Menu2.cpp
Created October 24, 2016 13:02
Menu 2
#include <iostream>
using namespace std;
int main ()
{
int MenuCode;
double Price, Order, Total1, Total2, Total3, Tax, Receive;
Tax = 0.06;
@HDI1234
HDI1234 / TnT.cpp
Created October 24, 2016 12:45
Travel & Tour
#include <iostream>
#include <string>
using namespace std;
int main ()
{
int Person;
double Staff, Phone,;
char PackageCode, Response;
@HDI1234
HDI1234 / Menu.cpp
Created October 24, 2016 12:43
Key in
#include <iostream>
#include <string>
using namespace std;
int main ()
{
int MenuCode;
string MenuType;
double Price, Order, Total1, Total2, Total3, Tax, Balance, Receive;
@HDI1234
HDI1234 / TPS.cpp
Created October 23, 2016 10:58
Theme Park Simulator
#include <iostream>
using namespace std;
int main ()
{
double PackageName, Price, Age, TotalTickets, TotalPrice, FullAmount, Sold, Adult, Child, Senior;
FullAmount = 0;
@HDI1234
HDI1234 / PowerCalc.cpp
Last active October 23, 2016 10:53
Power Calculator
#include <iostream>
using namespace std;
int power (int v, int i)
{
int p;
p = v*i;
return p;
}
@HDI1234
HDI1234 / calc.cpp
Last active October 11, 2016 15:18
Sum & Average Calculator
#include <stdio.h>
#include <iostream>
int main ()
{
int num, x, avg, sum, i;
sum = 0;
for (x=1;x<=5;x++)
{