Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Microsoft Word - Coursework_20192020_2.docx University of Westminster School of Computer Science & Engineering 5COSC001W Object Oriented Programming – Coursework 1 (2019/20) Module leader...

1 answer below »
Microsoft Word - Coursework_20192020_2.docx
University of Westminster
School of Computer Science & Engineering

5COSC001W                                                    Object    Oriented    Programming        –    Coursework    1    (2019/20)    
Module    leader     Ba
ara    Villarini    
Unit     Coursework    1        
Weighting:     50%    
Qualifying    mark     30%    
Description    
Object    Oriented    Programming    and    Design    
Learning    Outcomes    Covered    
in    this    Assignment:    
This    assignment    contributes    towards    the    following    Learning    Outcomes    (LOs):    
- LO1        Identify    and    justify    good    practices    in    the    development    of    object    
oriented    software;            
- LO2        Apply    acquired    knowledge    of    concepts,    characteristics,    tools    and    
environments    to    adapt    to    new    computational    environments    and    
programming    languages    which    are    based    on    object    oriented    principles;            
- LO3        Design,    implement    efficiently    applications    based    on    a    OOP    language,    
given    a    set    of    functional    requirements.            
- LO4        Implement    GUI    interfaces    using    an    OOP    language;            
    
Handed    Out:     15th    October    2019    
Due    Date     Monday    2nd    December    2019    Submissions    by    13:00    
Expected    deliverables     Submit    on    Blackboard    a    zip    file    containing:    
A    folder    with    all    the    UML    documents    and    test    case    plan    attached    
A    folder    with    the    developed    project    (NetBeans    Solution    with    your    Java    code)    
    
Method    of    Submission:    
Electronic    submission    on    BB    via    a    provided    link    close    to    the    submission    time.        
        
Type     of     Feedback     and     Due    
Date:        
    
Written     feedback     within     15     working     days     and     generic     feedback     during     the    
demonstration.    
Assessment    regulations    
Refer    to    section    4    of    the    “How    you    study”    guide    for    undergraduate    students    for    a    clarification    of    how    you    are    
assessed,    penalties    and    late    submissions,    what    constitutes    plagiarism    etc.    
Penalty    for    Late    Submission    
If    you    submit    your    coursework    late    but    within    24    hours    or    one    working    day    of    the    specified    deadline,    10    marks    
will    be    deducted    from    the    final    mark,    as    a    penalty    for    late    submission,    except    for    work    which    obtains    a    mark    in    
the     range     40     –     49%,     in     which     case     the     mark     will     be     capped     at     the     pass     mark     (40%).     If     you     submit     your    
coursework    more    than    24    hours    or    more    than    one    working    day    after    the    specified    deadline    you    will    be    given    a    
mark     of     zero     for     the    work     in     question     unless     a     claim     of    Mitigating     Circumstances     has     been     submitted     and    
accepted    as    valid.        
It    is    recognised    that    on    occasion,    illness    or    a    personal    crisis    can    mean    that    you    fail    to    submit    a    piece    of    work    on    
time.     In    such    cases    you    must     inform    the    Campus    Office     in    writing    on    a    mitigating    circumstances    form,    giving    
the    reason    for    your    late    or    non-submission.    You    must    provide    relevant    documentary    evidence    with    the    form.    
This    information    will    be    reported    to    the    relevant    Assessment    Board    that    will    decide    whether    the    mark    of    zero    
shall     stand.     For    more    detailed     information     regarding    University    Assessment    Regulations,     please     refer     to     the    
following    website:http:
www.westminster.ac.uk/study/cu
ent-students
esources/academic-regulations    


Coursework Description
    
Objectives:    
The    aim    of    this    coursework    is    to    assess    the    knowledge    and    skills    that    you    have    acquired    about    object-oriented    
programming    during    the    module.    You    are    asked    to    implement    a    program    in    which    objects    interact    in    order    to    
fulfil    with    a    set    of    functional    requirements.    
    
Analyse    the    problem    statement:    
An     important    skill     that    you    will     start     to    develop     in     this    module     is    analysing    a    problem    statement     in    order     to    
identify    the    details    needed    to    develop    a    solution.    
In    this    assignment,    the    first    task    you    should    perform    is    a    careful    analysis    of    the    problem    statement    in    order    to    
make    sure    you    have    all     the     information    to    elaborate    a    solution.     If    you    have    any    questions    please    write    your    
queries    on    the    Padlet    on    BB.    
    
Design    a    solution    
The    design    of    your    system    should    be    consistent    with    the    Object    Oriented    principles    and    easy    to    understand    by    
an    independent    programmer.        
    
You    are    required    to    design    your    program    using    UML    diagrams.    In    particular    you    have    to    draw:    
• two    use    cases    for    the    system    (6    marks).    
• a    class    diagram    (6    marks)    
    
Problem    description    and    requirement    statement    
You    are    required    to    develop    a    program    that    implements    a    basic    vehicle    rental    system.    
You    should    implement    a    console    system    from    where    the    manager    can    add    new    vehicles,    delete    if    needed,    
print    the    vehicle    information,    etc.    (as    described    in    detailed    below).        
You    should    implement    a    Graphical    User    Interface    (GUI)    from    where    a    customer    can    see    the    list    of    vehicles    and    
ook    available    vehicles    for    specific    dates.    
    
In    this    assignment,    you    will    be    required    to    implement    the    following    functionality:    

1. According    to    the    Inheritance    principle    you    have    to    design    and    implement    a    super    class    Vehicle    (6    marks)    
and     the     subclasses     Car     and     Moto
ike.     The     classes     should     include     appropriate     methods     in     order     to    
comply    with     the     encapsulation     principle     and     hold     information     about     the    Plate     number,     and     the    Make    
(You    can    add    any    other    information    that    you    consider    appropriate    for    a    rental    vehicle    system    and    you    can    
implement    additional    classes    with    justification    to    make    the    code    more    robust    or    user    friendly).    
    
In    particular:    
• The     Car     class     should     hold     specific     information     and    methods.     You     should     add     at     least     2     instance    
variables    (attributes    that    you    believe    are    important    to    be    held    in    this    class)    and    the    relative    get/set    
methods    (5    marks).        
    
• The    Moto
ike     class     should     hold     specific     information     and     methods.     You     should     add     at     least     2    
instance    variables    (attributes)    and    the    relative    get/set    methods    (5    marks).    
    
• You    should    implement    a    class    Schedule    to    represent    the    time    slot    when    a    vehicle    has    been    booked.    
The    class    should    have    a    pick-up    date    and    a    drop-off    date    (to    represent    the    date    you    can    use    either    
the    class    provided    during    tutorials    or    you    can    use    any    java    API).    (5    marks).    
    
2. Design     and     implement     a     class     called     WestminsterRentalVehicleManager,     which     implements     the    
interface    RentalVehicleManager     (2    marks).    WestminsterRentalVehicleManager    maintains    the     list    of     the    
vehicle    to    rent    and    provides    all    the    methods    for    the    system    manager.    
        
The    class    should    display    in    the    console    a    menu    containing    the    following    management    actions    from    which    the    
manager    can    select    one.        
    
• Add    a    new    vehicle    in    the    rental    system.    It    should    be    possible    to    add    a    new    vehicle,    either    a    car    or    a    
moto
ike     with     all     the    relevant     information.     You     should     consider     that     in     the     rental     vehicle     park    
there    are    max    50    parking    lots    (5    marks).        
    
• Delete     a     vehicle     from     the     system,     selecting     the     plate     number.     Display     a     message     with     the    
information     of     the     vehicle     that     has     been     deleted     (if     it     is     a     car     or    moto
ike)     and     the     number     of    
available    parking    lots    in    the    garage    (5    marks).        
    
• Print     the     list    of     the    vehicles     in     the     system.    For    each    vehicle,    print     the    plate    number,     the     type    of    
vehicle    (if    is    a    car    or    a    moto
ike).    The    list    should    be    ordered    alphabetically    according    to    the    vehicle    
make    (5    marks).        
    
• Write/Save        the    vehicle    stock    list    in    a    file    after    any    changes    (5    marks).    
    
• Open    a    Graphical    User    Interface    (GUI)    from    the    menu    console.        
You    should    implement    the    GUI    according    the    following    specification:    
    
• The    user    can    visualise    the    list    of    vehicles    in    WestminsterRentalVehicle    system    with    relative    
information    (8    marks).    
    
• The    user    can    filter    the    vehicles    according    at    least    one    parameter    (e.g.    the    type    of    the    vehicle,    
or    the    engine    size,    or    the    make,    etc.)    (4    marks).    
    
• The    user    can    check    the    availability    of    the    vehicle    in    specific    dates    and    can    book    make    a    
eservation    if    it    is    available    (8    marks).    
    
Note:    You    can    choose    how    the    GUI    should    look    like    and    how    to    meet    at    the    best    these    specifications.        
    
3.    Testing    and    system    validation:    
    
• Write    a     test    plan    designed     to    ensure     that     the     coded     solution    works    as    expected.     The     test    plan    will    
include    specific    instructions    about    the    data    and    conditions    the    program    will    be    tested    with    (5marks).    
• Implement    an    automated    testing     (you    can    use    JUnit    or     feel     free    to    use    any    other    tool    or    scripts     for    
unit    testing)    that    runs    scenarios    of    each    of    the    use    cases    you    implemented    in    the    console    menu    (10    
marks).    
• The    following    will    be    evaluated:    
o The    robustness    of    the    code    through    the    use    of    e
or    handling    and    input    validation    (5marks).    
o The    quality    of    the    code    and    the    adherence    to    coding    standards    and    conventions    (5    marks).    
        
Demonstration    
You    will    be    expected    to    be    familiar    with    your    code    and    required    to    make    any    ad-hoc    changes    during    
the    demonstration    
Please    note    that    no    marks    will    be    given    to    a    task    if    there    is    no    understanding    of    the    code.    
Note    that    the    maximum    mark    for    work    marked    without    a    viva/demonstration    shall    range    from    1-30%    only.        
Coursework    Guidance        
The    implementation    goals    are    split    into    4    phases:        
Phase    I    This    involves    an    initial    design    of    your    system    through    UML    diagrams    and    the    implementation    of    the    
classes    Vehicle,    Car,    Moto
ike    and    Schedule    (plus    any    accessory    class    you    might    need),    and    the    Interface    
RentalVehicleManager.    The    marking    scheme    allows    for    students    to    score    up    to    35%.    I    would    suggest    
concluding    this    Phase    1    by    Week    05.    
Phase    II    This    is    for    implementing    the    system    functionalities    through    a    console    menu.    You    should    provide    the    
implementation    (in    the    class    WestminsterRentalVehicleManager)    of    methods    to    add,    delete,    print,    sort    
vehicles    and    generate    report.    The    marking    scheme    allows    for    students    to    score    up    to    55%.    I    would    suggest    
concluding    this    phase    2    by    Week    07.    
Phase    III    This    phase    involves    the    GUI    implementation    and    the    possibility    for    a    user    to    visualise    and    book    a    
vehicle.    The    marking    scheme    allows    for    students    to    score    up    to    75%.    I    would    suggest    concluding    this    phase    3    
y    Week    09.    
Phase    IV    This    phase    is    dedicated    to    the    testing    and    evaluation    of    your    system    and    the    marking    scheme    allows    
for    students    to    score    up    100%    for    completing    all    the    phases.    This    Phase    4    needs    to    be    concluded    by    week    11    
(week    of    final    submission).
Answered Same Day Nov 27, 2021

Solution

Neha answered on Dec 01 2021
127 Votes
vehicle rantal syste/.classpath

    
    
    
vehicle rantal syste/.project

     Romy Car Rental
    
    
    
    
        
             org.eclipse.jdt.core.javabuilde
            
            
        
    
    
         org.eclipse.jdt.core.javanature
    
vehicle rantal syste
in/Car.class
public synchronized class Car {
private String carType;
private String carModel;
private double carPrice;
public void Car();
public void setCar(String, String, double);
public String getCarType();
public String getCarModel();
public String getCar();
public double getCarPrice();
}
vehicle rantal syste
in/Customer.class
public synchronized class Customer {
private String firstName;
private String lastName;
private String gender;
private String status;
private String location;
private String contact;
public void Customer();
public void setCustomer(String, String, String, String, String, String);
public String getFirstName();
public String getLastName();
public String getFullName();
public String getGender();
public String getStatus();
public String getLocation();
public String getContact();
}
vehicle rantal syste
in/Rental.class
public synchronized class Rental {
private static final int WIDTH = 600;
private static final int HEIGHT = 400;
public void Rental();
public static void main(String[]);
}
vehicle rantal syste
in/RentalView$carBackButton.class
synchronized class RentalView$carBackButton implements java.awt.event.ActionListener {
private void RentalView$carBackButton(RentalView);
public void actionPerformed(java.awt.event.ActionEvent);
}
vehicle rantal syste
in/RentalView$customerBackButton.class
synchronized class RentalView$customerBackButton implements java.awt.event.ActionListener {
private void RentalView$customerBackButton(RentalView);
public void actionPerformed(java.awt.event.ActionEvent);
}
vehicle rantal syste
in/RentalView$customerNextButton.class
synchronized class RentalView$customerNextButton implements java.awt.event.ActionListener {
private void RentalView$customerNextButton(RentalView);
public void actionPerformed(java.awt.event.ActionEvent);
}
vehicle rantal syste
in/RentalView$finalStepButton.class
synchronized class RentalView$finalStepButton implements java.awt.event.ActionListener {
private void RentalView$finalStepButton(RentalView);
public void actionPerformed(java.awt.event.ActionEvent);
}
vehicle rantal syste
in/RentalView$firstCarButton.class
synchronized class RentalView$firstCarButton implements java.awt.event.ActionListener {
private void RentalView$firstCarButton(RentalView);
public void actionPerformed(java.awt.event.ActionEvent);
}
vehicle rantal syste
in/RentalView$forthCarButton.class
synchronized class RentalView$forthCarButton implements java.awt.event.ActionListener {
private void RentalView$forthCarButton(RentalView);
public void actionPerformed(java.awt.event.ActionEvent);
}
vehicle rantal syste
in/RentalView$mainNextButton.class
synchronized class RentalView$mainNextButton implements java.awt.event.ActionListener {
private void RentalView$mainNextButton(RentalView);
public void actionPerformed(java.awt.event.ActionEvent);
}
vehicle rantal syste
in/RentalView$reserveBackButton.class
synchronized class RentalView$reserveBackButton implements java.awt.event.ActionListener {
private void RentalView$reserveBackButton(RentalView);
public void actionPerformed(java.awt.event.ActionEvent);
}
vehicle rantal syste
in/RentalView$reserveNextButton.class
synchronized class RentalView$reserveNextButton implements java.awt.event.ActionListener {
private void RentalView$reserveNextButton(RentalView);
public void actionPerformed(java.awt.event.ActionEvent);
}
vehicle rantal syste
in/RentalView$secondCarButton.class
synchronized class RentalView$secondCarButton implements java.awt.event.ActionListener {
private void RentalView$secondCarButton(RentalView);
public void actionPerformed(java.awt.event.ActionEvent);
}
vehicle rantal syste
in/RentalView$thirdCarButton.class
synchronized class RentalView$thirdCarButton implements java.awt.event.ActionListener {
private void RentalView$thirdCarButton(RentalView);
public void actionPerformed(java.awt.event.ActionEvent);
}
vehicle rantal syste
in/RentalView.class
public synchronized class RentalView extends javax.swing.JFrame {
private Transaction aTrans;
private Customer aCustomer;
private Car aCar;
WarningReserve openWarningReserve;
WarningCustomer openWarningCustomer;
WarningCar openWarningCar;
java.awt.Container pane;
private javax.swing.JPanel mainP;
private javax.swing.JPanel reserveP;
private javax.swing.JPanel customerP;
private javax.swing.JPanel carP;
private javax.swing.JPanel finalP;
private javax.swing.JLabel titleL;
private javax.swing.JLabel dateL;
private javax.swing.JButton mainNextB;
private javax.swing.JComboBox cMCB;
private javax.swing.JComboBox cDCB;
private javax.swing.JComboBox cYCB;
private javax.swing.JLabel dayL;
private javax.swing.JLabel pickupDateL;
private javax.swing.JLabel returnDateL;
private javax.swing.JLabel birthDateL;
private javax.swing.JComboBox pUMCB;
private javax.swing.JComboBox pUDCB;
private javax.swing.JComboBox pUYCB;
private javax.swing.JComboBox rMCB;
private javax.swing.JComboBox rDCB;
private javax.swing.JComboBox rYCB;
private javax.swing.JComboBox bMCB;
private javax.swing.JComboBox bDCB;
private javax.swing.JComboBox bYCB;
private javax.swing.JLabel dateChecker;
private javax.swing.JLabel ageChecker;
private javax.swing.JButton reserveNextB;
private javax.swing.JButton reserveBackB;
private javax.swing.JLabel customerL;
private javax.swing.JLabel firstNameL;
private javax.swing.JLabel lastNameL;
private javax.swing.JLabel locationL;
private javax.swing.JLabel contactL;
private javax.swing.JLabel genderL;
private javax.swing.JLabel ageL;
private javax.swing.JLabel statusL;
private javax.swing.JLabel showAgeL;
private javax.swing.JTextField firstNameTF;
private javax.swing.JTextField lastNameTF;
private javax.swing.JTextField locationTF;
private javax.swing.JTextField contactTF;
private javax.swing.JTextField genderTF;
private javax.swing.JTextField statusTF;
private javax.swing.JLabel firstNameChecker;
private javax.swing.JLabel lastNameChecker;
private javax.swing.JLabel genderChecker;
private javax.swing.JLabel statusChecker;
private javax.swing.JLabel locationChecker;
private javax.swing.JLabel contactChecker;
private javax.swing.JButton customerNextB;
private javax.swing.JButton customerBackB;
private javax.swing.JLabel carL;
private javax.swing.JButton firstCarB;
private javax.swing.JButton secondCarB;
private javax.swing.JButton thirdCarB;
private javax.swing.JButton forthCarB;
private javax.swing.JButton carNextB;
private javax.swing.JButton carBackB;
private javax.swing.JTextArea carDetailsTA;
private javax.swing.JTextArea receiptA;
public void RentalView();
}
vehicle rantal syste
in/Transaction.class
public synchronized class Transaction {
static final int MONTHS_DAYS = 30;
static final int MONTHS = 12;
private Customer aCustomer;
private Car aCar;
private int monthe;
private int days;
private String Cu
entMonth;
private int Cu
entDate;
private int Cu
entyear;
private String PickMonth;
private int PickDate;
private int PickYear;
private String returnMonth;
private int returnDate;
private int returnYear;
private String birthMonth;
private int birthDate;
private int birthYear;
private int age;
public void Transaction();
public void setTransaction(Customer, Car, String, int, int, String, int, int, String, int, int, String, int, int);
public String getCu
entMonth();
public int getCu
entDate();
public int getCu
entYear();
public int getCu
entMonthValue();
public String getPickMonth();
public int getPickDate();
public int getPickYear();
public int getPickMonthValue();
public String getReturnMonth();
public int getReturnDate();
public int getReturnYear();
public int getReturnMonthValue();
public String getBirthMonth();
public int getBirthDate();
public int getBirthYear();
public int getBirthMonthValue();
public int getAge();
public int getDays();
public double getRentalPrice();
public String toStringDateChecker();
public String toStringAgeChecker();
public String toStringAge();
public String toStringMrMrs();
public String toStringReceipt();
public void saveToFile() throws java.io.IOException;
}
vehicle rantal syste
in/WarningCar.class
public synchronized class WarningCar extends javax.swing.JFrame {
private javax.swing.JPanel warningP;
private javax.swing.JLabel textL;
private javax.swing.JLabel iconL;
private Transaction aTrans;
public void WarningCar();
}
vehicle rantal syste
in/WarningCustomer.class
public synchronized class WarningCustomer extends javax.swing.JFrame {
private javax.swing.JPanel warningP;
private javax.swing.JLabel textL;
private javax.swing.JLabel iconL;
private Transaction aTrans;
public void WarningCustomer();
}
vehicle rantal syste
in/WarningReserve.class
public synchronized class WarningReserve extends javax.swing.JFrame {
private javax.swing.JPanel warningP;
private javax.swing.JLabel textL;
private javax.swing.JLabel iconL;
private Transaction aTrans;
public void WarningReserve();
}
vehicle rantal syste/Class Diagram.png
vehicle rantal syste/images
ack.GIF
vehicle rantal syste/images/car.GIF
vehicle rantal syste/images/car_back.GIF
vehicle rantal syste/images/customer.GIF
vehicle rantal syste/images/customer_back.GIF
vehicle rantal syste/images/jeepney.gif
vehicle rantal syste/images/limousine.gif
vehicle rantal syste/images/logo.GIF
vehicle rantal syste/images/logo1.GIF
vehicle rantal syste/images/next.GIF
vehicle rantal syste/images/pickup.GIF
vehicle rantal syste/images/submit.GIF
vehicle rantal syste/images/van.gif
vehicle rantal syste/images/warning_icon.GIF
vehicle rantal syste/images/warning_top_icon.GIF
vehicle rantal syste/src/admin.java
vehicle rantal...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here