Senin, 24 Oktober 2016

Gimana sih Use Casenya FlightReservation??

Jadi gini. Sama seperti usecase nya ATM yang kemaren2, kali ini saya membuat use case Flight Reservation.

USE CASE DIAGRAM




SEQUENCE DIAGRAM














CLASS DIAGRAM



IMPLEMENTASI
public class systemUsers
 {

        static ManageVector system1 = new ManageVector("login1.txt");
    
    static Vector systemuser1 = new Vector();

        public static void saveUser()
    {
        system1.saveVector(systemuser1);
    }

        public static void loadUser()
    {    
        systemuser1 = system1.loadVector();
    }

public class flightResDetails extends FlightDetails  
    {
        String Name;
        String Address;
        int phone;
        String Email;
        final String[] ReservationType = {"FirstClass","SecondClass","ThirdClass"};
        String Res;
        int Num_OfResSeats;


 public class FlightDetails implements Serializable
  {
        public String Flight_Num;
        public String FlightDate;
        public String Time;
        public int Num_Of_Seats;
        public String Source;
        public String Destination;
    



public class flightMenu //extends mainSystem
{
    static Vector fDetails = new Vector();    

    static ManageVector  manage = new ManageVector("sample.txt");   

    static Vector fResDetails = new Vector();    

    static ManageVector res = new ManageVector("res.txt"); 


public class flightResMenu    
{

    static Vector fResDetails = new Vector();    

    static Vector fDetails = new Vector();    
    
    static ManageVector manager = new ManageVector();  

public class ManageVector
{


public Vector myVector = new Vector();

public String filePath;



Senin, 17 Oktober 2016

Sequence Diagram & Prototype Thingy!


Singkat saja, melanjutkan pos kemarin yang berisi Use Case Diagram dan Sequence Diagram.
Bagi yang lagi lupa ingatan silahkan dilihat lagi dibawah ini.

USE CASE DIAGRAM




SEQUENCE  DIAGRAM

Startup System

Session






















Shutdown System



 Sudah Ingat? Semoga ingatan anda bisa dipulihkan dengan Diagram diagram diatas.
Dalam membuat aplikasi, tidak mungkin bisa direncanakannya aplikasi tersebut tanpa adanya gambaran awal tentang aplikasi tersebut akan berupa seperti apa nantinya, atau dengan kata lain Implementasi Prototype Aplikasi.

Berikut Source Codenya :

#include<string>
using std::string;
using std::getline;

#include <vector>
using std::vector;

#include <iostream>
using std::cout;
using std::endl;
using std::cin;

#include <iomanip>
using std::setw;
using std::left;
using std::right;

#include <fstream>
using std::ofstream;
using std::ifstream;

#include <sstream>
using std::stringstream;

#include <ctime>
class LoginUser {
    private:
    string _PIN;
    string _namaUser;
    string _noRekening;
    string _saldo;
    public:
    List();
    List(string id, string category, string itemDescription, string price);
    List(string id, string quantity, string price, string total, string VAT );
 void display();
    void Bill();
};

class ListItem {
    public:
    void getRek();
    void getNama();
    void getPIN();
    void getSaldo();
    void newPIN();
};