This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Class Passenger | |
* | |
* Amirul Naim | |
* 1.0.0 | |
*/ | |
public class Passenger | |
{ | |
String name; | |
int id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
int main () | |
{ | |
int Person; | |
double Staff, Phone,; | |
char PackageCode, Response; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main () | |
{ | |
double PackageName, Price, Age, TotalTickets, TotalPrice, FullAmount, Sold, Adult, Child, Senior; | |
FullAmount = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int power (int v, int i) | |
{ | |
int p; | |
p = v*i; | |
return p; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <iostream> | |
int main () | |
{ | |
int num, x, avg, sum, i; | |
sum = 0; | |
for (x=1;x<=5;x++) | |
{ |
NewerOlder