Commit 06d080ae authored by norbert.dajnowski's avatar norbert.dajnowski

Final Version

parent af7c47a7
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<codeStyleSettings language="XML">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
</code_scheme>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<compositeConfiguration>
<compositeBuild compositeDefinitionSource="SCRIPT" />
</compositeConfiguration>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="resolveModulePerSourceSet" value="false" />
<option name="testRunner" value="PLATFORM" />
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
# CarRental_Norbert_Dajnowski
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.car_rental_system"
minSdkVersion 26
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package com.example.car_rental_system;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.car_rental_system", appContext.getPackageName());
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.car_rental_system">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".receiptActivity"></activity>
<activity
android:name=".mainApp"
android:label="@string/title_activity_main_app"
android:theme="@style/AppTheme.NoActionBar" />
<activity android:name=".registerActivity" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
\ No newline at end of file
package com.example.car_rental_system;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
dbConnector myDB;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
System.out.println("HELLO TEST");
myDB = new dbConnector(this);
}
public void LoginButton(View view){
EditText username = (EditText) findViewById(R.id.Username);
EditText password = (EditText) findViewById(R.id.Password);
dbConnector objDbConnector = new dbConnector(this);
if (objDbConnector.login(username.getText().toString(), password.getText().toString())){
Intent intent = new Intent(this, mainApp.class);
startActivity(intent);
mainApp.username = username.getText().toString();
}
else{
Toast.makeText(getApplicationContext(),
"Unsuccessful login \nIncorret credentials", Toast.LENGTH_LONG).show();
}
}
public void RegisterButton(View view){
startActivity(new Intent(MainActivity.this, registerActivity.class));
}
}
package com.example.car_rental_system;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteCantOpenDatabaseException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class dbConnector extends SQLiteOpenHelper {
public static final int DB_VERSION = 1;
public static final String DB_NAME = "carRental.db";
public static final String TABLE_Users = "Users";
public static final String COLUMN_ID = "UserID";
public static final String COLUMN_Name = "Name";
public static final String COLUMN_UserName = "UserName";
public static final String COLUMN_Password = "Password";
public dbConnector(Context context){
super(context, DB_NAME, null, DB_VERSION);
SQLiteDatabase database = this.getWritableDatabase();
System.out.println("database ini");
onCreate(database);
}
@Override
public void onCreate(SQLiteDatabase database){
SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
Date date = new Date();
try {
ContentValues car1 = new ContentValues();
ContentValues car2 = new ContentValues();
ContentValues car3 = new ContentValues();
ContentValues car4 = new ContentValues();
ContentValues car5 = new ContentValues();
car1.put("Car", "Benz");
car1.put("Timeleft", 0);
car1.put("StartDate", formatter.format(date));
car2.put("Car", "Toyota");
car2.put("Timeleft", 0);
car2.put("StartDate", formatter.format(date));
car3.put("Car", "Jaguar");
car3.put("Timeleft", 0);
car3.put("StartDate", formatter.format(date));
car4.put("Car", "Audi");
car4.put("Timeleft", 0);
car4.put("StartDate", formatter.format(date));
car5.put("Car", "Honda");
car5.put("Timeleft", 0);
car5.put("StartDate", formatter.format(date));
database.execSQL( "CREATE TABLE Users(UserID INTEGER PRIMARY KEY AUTOINCREMENT, Name TEXT, UserName TEXT, Password TEXT, Status TEXT)");
database.execSQL( "CREATE TABLE Reviews(ReviewID INTEGER PRIMARY KEY AUTOINCREMENT, Username TEXT, Car TEXT, Review TEXT, Date DATE)");
database.execSQL( "CREATE TABLE Rentals(RentalID INTEGER PRIMARY KEY AUTOINCREMENT, Car TEXT, Timeleft INTEGER, StartDate DATETIME ,Username TEXT)");
database.insert("Rentals", null, car1);
database.insert("Rentals", null, car2);
database.insert("Rentals", null, car3);
database.insert("Rentals", null, car4);
database.insert("Rentals", null, car5);
System.out.println("Table created");
}catch (Exception e){
System.out.print("Table already exists on the system.");
}
}
@Override
public void onUpgrade(SQLiteDatabase database, int oldVer, int newVer){
database.execSQL("DROP TABLE IF EXISTS " +TABLE_Users);
database.execSQL("DROP TABLE IF EXISTS Rentals");
database.execSQL("DROP TABLE IF EXISTS Reviews");
onCreate(database);
System.out.println("Table updated");
}
public void rentCar(String car, Integer hours, String user){
SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
Date date = new Date();
ContentValues values = new ContentValues();
values.put("Timeleft", hours);
values.put("StartDate", formatter.format(date));
values.put("Username", user);
SQLiteDatabase database = this.getWritableDatabase();
database.update("Rentals", values, "Car = \"" + car + "\"", null);
database.close();
}
public void addUser(String name, String username, String password){
String passwordHash = password;
try {
// Create MessageDigest instance for MD5
MessageDigest md = MessageDigest.getInstance("MD5");
//Add password bytes to digest
md.update(passwordHash.getBytes());
//Get the hash's bytes
byte[] bytes = md.digest();
//This bytes[] has bytes in decimal format;
//Convert it to hexadecimal format
StringBuilder sb = new StringBuilder();
for(int i=0; i< bytes.length ;i++)
{
sb.append(Integer.toString((bytes[i] & 0xff) + 0x100, 16).substring(1));
}
//Get complete hashed password in hex format
passwordHash = sb.toString();
}
catch (
NoSuchAlgorithmException e)
{
e.printStackTrace();
}
ContentValues values = new ContentValues();
values.put(COLUMN_Name, name);
values.put(COLUMN_UserName, username);
values.put(COLUMN_Password, passwordHash);
SQLiteDatabase database = this.getWritableDatabase();
database.insert(TABLE_Users, null, values);
database.close();
}
public boolean login(String username, String password){
boolean result = false;
String passwordHash = password;
try {
// Create MessageDigest instance for MD5
MessageDigest md = MessageDigest.getInstance("MD5");
//Add password bytes to digest
md.update(passwordHash.getBytes());
//Get the hash's bytes
byte[] bytes = md.digest();
//This bytes[] has bytes in decimal format;
//Convert it to hexadecimal format
StringBuilder sb = new StringBuilder();
for(int i=0; i< bytes.length ;i++)
{
sb.append(Integer.toString((bytes[i] & 0xff) + 0x100, 16).substring(1));
}
//Get complete hashed password in hex format
passwordHash = sb.toString();
}
catch (
NoSuchAlgorithmException e)
{
e.printStackTrace();
}
String query = "Select * FROM " + TABLE_Users +
" WHERE " + COLUMN_UserName + " = \"" + username + "\"";
SQLiteDatabase database = this.getWritableDatabase();
Cursor cursor = database.rawQuery(query, null);
if (cursor.moveToFirst()){
if(cursor.getString(3).equals(passwordHash)){
result = true;
}
else {
result = false;
}
}
cursor.close();;
database.close();;
return result;
}
public boolean checkAvailable(String car){
String query = "SELECT * FROM Rentals WHERE Car = \"" + car + "\" AND Timeleft == 0";
SQLiteDatabase database = this.getWritableDatabase();
Cursor cursor = database.rawQuery(query, null);
if (cursor.moveToFirst()){
return true;
}
cursor.close();;
database.close();;
return false;
}
public Integer timeLeft(String car){
String query = "SELECT * FROM Rentals WHERE Car = \"" + car + "\" AND Timeleft > 0";
SQLiteDatabase database = this.getWritableDatabase();
Cursor cursor = database.rawQuery(query, null);
if (cursor.moveToFirst()){
return cursor.getInt(2);
}
cursor.close();;
database.close();;
return 0;
}
public String findUser (String username){
String s = null;
String query = "Select * FROM " + TABLE_Users +
" WHERE " + COLUMN_UserName + "= \"" + username + "\"";
SQLiteDatabase database = this.getWritableDatabase();
Cursor cursor = database.rawQuery(query, null);
if (cursor.moveToFirst()){
s = Integer.parseInt(cursor.getString((0))) +
cursor.getString(1) +
cursor.getString(2) +
cursor.getString(3);
}else {
s = null;
}
cursor.close();;
database.close();
return s;
}
public boolean checkExist (String username){
if (findUser(username) == null){
return false;
}
return true;
}
}
package com.example.car_rental_system;
import android.content.Intent;
import android.os.Bundle;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;
import org.w3c.dom.Text;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class mainApp extends AppCompatActivity {
public static String username;
public static String name;
public static List<String> rentedCars = new ArrayList<String>();
public static List<Integer> rentedHours = new ArrayList<Integer>();
public static List<String> refreshmentChoices = new ArrayList<String>();
public static List<Integer> refreshmentMultipliers= new ArrayList<Integer>();
private double discount;
public static double overallCost = 0;
private TextView discountView;
private Button drawButton;
private TextView hours1;
private TextView hours2;
private TextView hours3;
private TextView hours4;
private TextView hours5;
private TextView status1;
private TextView status2;
private TextView status3;
private TextView status4;
private TextView status5;
private TextView car1;
private TextView car2;
private TextView car3;
private TextView car4;
private TextView car5;
private Spinner cakeItems;
private Spinner cookieItems;
private Spinner sandwichItems;
private Spinner sweetsItems;
private Spinner waterItems;
private Spinner juiceItems;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_app);
TextView welcome = (TextView) findViewById(R.id.userWelcome);
welcome.setText(welcome.getText().toString() + username);
setupEditables();
statusCheck();
}
private void setupEditables(){
List<Integer> spinnerArray = new ArrayList<Integer>();
spinnerArray.add(1);
spinnerArray.add(2);
spinnerArray.add(3);
ArrayAdapter<Integer> adapter = new ArrayAdapter<Integer>(this, android.R.layout.simple_spinner_item, spinnerArray);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
cakeItems = (Spinner) findViewById(R.id.cakeSpinner);
cookieItems = (Spinner) findViewById(R.id.cakeSpinner2);
sandwichItems = (Spinner) findViewById(R.id.cakeSpinner4);
sweetsItems = (Spinner) findViewById(R.id.cakeSpinner5);
waterItems = (Spinner) findViewById(R.id.cakeSpinner6);
juiceItems = (Spinner) findViewById(R.id.cakeSpinner9);
cakeItems.setAdapter(adapter);
cookieItems.setAdapter(adapter);
sandwichItems.setAdapter(adapter);
sweetsItems.setAdapter(adapter);
waterItems.setAdapter(adapter);
juiceItems.setAdapter(adapter);
hours1 = (TextView) findViewById(R.id.hours);
hours2 = (TextView) findViewById(R.id.hours2);
hours3 = (TextView) findViewById(R.id.hours3);
hours4 = (TextView) findViewById(R.id.hours4);
hours5 = (TextView) findViewById(R.id.hours5);
status1 = (TextView) findViewById(R.id.status);
status2 = (TextView) findViewById(R.id.status2);
status3 = (TextView) findViewById(R.id.status3);
status4 = (TextView) findViewById(R.id.status4);
status5 = (TextView) findViewById(R.id.status5);
car1 = (TextView) findViewById(R.id.car1);
car2 = (TextView) findViewById(R.id.car2);
car3 = (TextView) findViewById(R.id.car3);
car4 = (TextView) findViewById(R.id.car4);
car5 = (TextView) findViewById(R.id.car5);
}
private void updateRefreshments(){
try {
Integer cake = Integer.parseInt(cakeItems.getSelectedItem().toString());
refreshmentChoices.add("Cake");
refreshmentMultipliers.add(cake);
overallCost = overallCost + (cake * 1);
}catch (Exception e){
}
try {
Integer biscuits = Integer.parseInt(cookieItems.getSelectedItem().toString());
refreshmentChoices.add("Biscuit");
refreshmentMultipliers.add(biscuits);
overallCost = overallCost + (biscuits * 1.2);
}catch (Exception e){
}
try {
Integer sandwich = Integer.parseInt(sandwichItems.getSelectedItem().toString());
refreshmentChoices.add("Sandwich");
refreshmentMultipliers.add(sandwich);
overallCost = overallCost + (sandwich * 2);
}catch (Exception e){
}
try {
Integer sweets = Integer.parseInt(sweetsItems.getSelectedItem().toString());
refreshmentChoices.add("Sweets");
refreshmentMultipliers.add(sweets);
overallCost = overallCost + (sweets * 0.5);
}catch (Exception e){
}
try {
Integer water = Integer.parseInt(waterItems.getSelectedItem().toString());
refreshmentChoices.add("Water");
refreshmentMultipliers.add(water);
overallCost = overallCost + (water * 0.5);
}catch (Exception e){
}
try {
Integer juice = Integer.parseInt(cakeItems.getSelectedItem().toString());
refreshmentChoices.add("Juice");
refreshmentMultipliers.add(juice);
overallCost = overallCost + (juice * 1);
}catch (Exception e){
}
}
public void clickRent(View view){
dbConnector myDbConnector = new dbConnector(this);
try {
if (Integer.parseInt(hours1.getText().toString()) > 0) {
myDbConnector.rentCar(car1.getText().toString(), Integer.parseInt(hours1.getText().toString()), username);
rentedCars.add("Benz");
rentedHours.add(Integer.parseInt(hours1.getText().toString()));
overallCost = overallCost + (Integer.parseInt(hours1.getText().toString()) * 11);
}
}catch (Exception e){
}
try{
if (Integer.parseInt(hours2.getText().toString()) > 0) {
myDbConnector.rentCar(car2.getText().toString(), Integer.parseInt(hours2.getText().toString()), username);
rentedCars.add("Toyota");
rentedHours.add(Integer.parseInt(hours2.getText().toString()));
overallCost = overallCost + (Integer.parseInt(hours2.getText().toString()) * 7);
}
}catch (Exception e){
}
try{
if (Integer.parseInt(hours3.getText().toString()) > 0) {
myDbConnector.rentCar(car3.getText().toString(), Integer.parseInt(hours3.getText().toString()), username);
rentedCars.add("Jaguar");
rentedHours.add(Integer.parseInt(hours3.getText().toString()));
overallCost = overallCost + (Integer.parseInt(hours3.getText().toString()) * 10);
}
}catch (Exception e){
}
try{
if (Integer.parseInt(hours4.getText().toString()) > 0) {
myDbConnector.rentCar(car4.getText().toString(), Integer.parseInt(hours4.getText().toString()), username);
rentedCars.add("Audi");
rentedHours.add(Integer.parseInt(hours4.getText().toString()));
overallCost = overallCost + (Integer.parseInt(hours4.getText().toString()) * 8);
}
}catch (Exception e){
}
try{
if (Integer.parseInt(hours5.getText().toString()) > 0) {
myDbConnector.rentCar(car5.getText().toString(), Integer.parseInt(hours5.getText().toString()), username);
rentedCars.add("Honda");
rentedHours.add(Integer.parseInt(hours5.getText().toString()));
overallCost = overallCost + (Integer.parseInt(hours5.getText().toString()) * 9);
}
}catch (Exception e){
}
updateRefreshments();
overallCost = overallCost * ((100 - discount) / 100);
startActivity(new Intent(mainApp.this, receiptActivity.class));
}
public void clickDiscount(View view){
drawButton = (Button) findViewById(R.id.button);
discountView = (TextView) findViewById(R.id.discountView);
Random r = new Random();
discount = r.nextInt(51);
discountView.setText(discount + "%");
drawButton.setEnabled(false);
}
private void statusCheck(){
TextView [] statusList = {status1, status2, status3, status4, status5};
TextView [] carList = {car1, car2, car3, car4, car5};
TextView [] hourList = {hours1, hours2, hours3, hours4, hours5};
Boolean carStatus;
dbConnector dbHandler = new dbConnector(this);
for (int x = 0; x < 5; x++){
carStatus = dbHandler.checkAvailable(carList[x].getText().toString());
if (carStatus == true){
statusList[x].setText("Available");
hourList[x].setEnabled(true);
}else{
statusList[x].setText("Unavailable \nTime Left: " + dbHandler.timeLeft(carList[x].getText().toString()) );
hourList[x].setEnabled(false);
}
}
}
}
package com.example.car_rental_system;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
import org.w3c.dom.Text;
public class receiptActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_receipt);
updateReceipt();
}
private void updateReceipt(){
TextView cost = (TextView) findViewById(R.id.costView);
cost.setText("£" + mainApp.overallCost);
}
}
package com.example.car_rental_system;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;
public class registerActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
}
public void registerNewUser(View view) {
dbConnector dbHandler = new dbConnector(this);
EditText name = (EditText) findViewById(R.id.nameText);
EditText username = (EditText) findViewById(R.id.usernameText);
EditText password = (EditText) findViewById(R.id.passwordText);
Boolean usernameCompare = dbHandler.checkExist(username.getText().toString());
if ((name.getText().toString() == "") || (username.getText().toString() == "") || (password.getText().toString() == "")){
Toast.makeText(getApplicationContext(),
"Please enter all details in" ,
Toast.LENGTH_LONG).show();
return;
}
if (usernameCompare == true){
Toast.makeText(getApplicationContext(),
"Username already exists" ,
Toast.LENGTH_LONG).show();
return;
}
dbHandler.addUser(name.getText().toString(), username.getText().toString(), password.getText().toString());
Toast.makeText(getApplicationContext(),
"Successfully registrated " +
dbHandler.findUser(username.getText().toString()),
Toast.LENGTH_LONG).show();
}
public void loginBack(View view){
startActivity(new Intent(registerActivity.this, MainActivity.class));
}
}
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeWidth="1"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape= "rectangle" >
<solid android:color="#bdbdbd"/>
<stroke android:width="1dp" android:color="#000"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape= "rectangle" >
<stroke android:width="1dp" android:color="#9C9C9C"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#008577"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<Button
android:id="@+id/RegisterButton"
android:layout_width="260dp"
android:layout_height="40dp"
android:layout_marginTop="96dp"
android:onClick="RegisterButton"
android:text="@string/register"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.496"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/Password" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="60dp"
android:layout_marginTop="148dp"
android:text="@string/password"
android:textSize="18sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/car_rental"
android:textSize="30sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.084" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="60dp"
android:layout_marginTop="56dp"
android:text="@string/username"
android:textSize="18sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<EditText
android:id="@+id/Username"
android:layout_width="298dp"
android:layout_height="45dp"
android:layout_marginStart="60dp"
android:layout_marginTop="12dp"
android:ems="10"
android:inputType="textPersonName"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView"
android:autofillHints="" />
<EditText
android:id="@+id/Password"
android:layout_width="298dp"
android:layout_height="46dp"
android:layout_marginTop="12dp"
android:ems="10"
android:inputType="textPersonName"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.53"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView3" />
<Button
android:id="@+id/LoginButton"
android:layout_width="98dp"
android:layout_height="46dp"
android:layout_marginTop="28dp"
android:onClick="LoginButton"
android:text="Login"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/Password" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/coordinatorLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".mainApp" >
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="164dp"
android:text="Discount Draw:"
android:textColor="#000000"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.164"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/carTable" />
<Spinner
android:id="@+id/cakeSpinner9"
android:layout_width="43dp"
android:layout_height="17dp"
android:layout_marginStart="16dp"
android:layout_marginTop="48dp"
app:layout_constraintStart_toEndOf="@+id/cakeLabel2"
app:layout_constraintTop_toBottomOf="@+id/cakeSpinner2" />
<TextView
android:id="@+id/cakeLabel6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Juice(£1):"
android:textColor="#E4000000"
app:layout_constraintEnd_toStartOf="@+id/cakeSpinner5"
app:layout_constraintHorizontal_bias="0.809"
app:layout_constraintStart_toEndOf="@+id/cakeSpinner6"
app:layout_constraintTop_toBottomOf="@+id/cakeLabel4" />
<Spinner
android:id="@+id/cakeSpinner6"
android:layout_width="43dp"
android:layout_height="17dp"
android:layout_marginStart="12dp"
android:layout_marginTop="16dp"
app:layout_constraintStart_toEndOf="@+id/cakeLabel"
app:layout_constraintTop_toBottomOf="@+id/cakeSpinner4" />
<TextView
android:id="@+id/cakeLabel5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="16dp"
android:text="Water(£0.5):"
android:textColor="#E4000000"
app:layout_constraintEnd_toStartOf="@+id/cakeSpinner6"
app:layout_constraintHorizontal_bias="0.142"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cakeLabel3" />
<TextView
android:id="@+id/cakeLabel4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="Sweets(£0.5):"
android:textColor="#E4000000"
app:layout_constraintEnd_toStartOf="@+id/cakeSpinner5"
app:layout_constraintHorizontal_bias="0.821"
app:layout_constraintStart_toEndOf="@+id/cakeSpinner4"
app:layout_constraintTop_toBottomOf="@+id/cakeLabel2" />
<Spinner
android:id="@+id/cakeSpinner5"
android:layout_width="43dp"
android:layout_height="17dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
app:layout_constraintStart_toEndOf="@+id/cakeLabel2"
app:layout_constraintTop_toBottomOf="@+id/cakeSpinner2" />
<Spinner
android:id="@+id/cakeSpinner4"
android:layout_width="43dp"
android:layout_height="17dp"
android:layout_marginStart="12dp"
android:layout_marginTop="56dp"
app:layout_constraintStart_toEndOf="@+id/cakeLabel"
app:layout_constraintTop_toBottomOf="@+id/textView10" />
<TextView
android:id="@+id/cakeLabel3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="12dp"
android:text="Sandwich(£2):"
android:textColor="#E4000000"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cakeLabel" />
<TextView
android:id="@+id/cakeLabel2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="64dp"
android:layout_marginTop="24dp"
android:text="Biscuits(£1.2):"
android:textColor="#E4000000"
app:layout_constraintStart_toEndOf="@+id/cakeSpinner"
app:layout_constraintTop_toBottomOf="@+id/textView10" />
<Spinner
android:id="@+id/cakeSpinner2"
android:layout_width="43dp"
android:layout_height="17dp"
android:layout_marginStart="16dp"
android:layout_marginTop="24dp"
app:layout_constraintStart_toEndOf="@+id/cakeLabel2"
app:layout_constraintTop_toBottomOf="@+id/textView10" />
<TextView
android:id="@+id/userWelcome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Welcome "
android:textColor="#C9000000"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pageTitle" />
<TextView
android:id="@+id/pageTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="28dp"
android:text="Car Rental Services"
android:textColor="#000000"
android:textSize="28sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TableLayout
android:id="@+id/carTable"
android:layout_width="414dp"
android:layout_height="252dp"
android:layout_marginTop="24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/userWelcome">
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent"
android:onClick="@string/appbar_scrolling_view_behavior"
android:visibility="visible">
<TextView
android:id="@+id/statusLabel"
android:layout_width="70dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape"
android:text="Status"
android:textAlignment="center"
android:textColor="#000000"
android:textSize="18sp" />
<TextView
android:id="@+id/carLabel"
android:layout_width="43dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape"
android:text="@string/car"
android:textAlignment="center"
android:textColor="#000000"
android:textSize="18sp" />
<TextView
android:id="@+id/textView9"
android:layout_width="180dp"
android:layout_height="wrap_content"
android:background="@drawable/cell_shape"
android:text="Specification"
android:textAlignment="center"
android:textColor="#000000"
android:textSize="18sp" />
<TextView
android:id="@+id/hoursLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/cell_shape"
android:text="Price"
android:textAlignment="center"
android:textColor="#000000"
android:textSize="18sp" />
<TextView
android:id="@+id/carTypeLabel4"
android:layout_width="58dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape"
android:text="Hours"
android:textAlignment="center"
android:textColor="#000000"
android:textSize="18sp" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="48dp"
android:visibility="visible">
<TextView
android:id="@+id/status"
android:layout_width="53dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<TextView
android:id="@+id/car1"
android:layout_width="2dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:text="Benz"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<TextView
android:id="@+id/spec1"
android:layout_width="181dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:text="Power locks/windows, air bags manual hatchback, 4 people"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<TextView
android:id="@+id/price"
android:layout_width="41dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:text="£11/hr"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<EditText
android:id="@+id/hours"
android:layout_width="27dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:ems="10"
android:inputType="number"
android:textColor="#DA000000" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/status2"
android:layout_width="53dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<TextView
android:id="@+id/car2"
android:layout_width="48dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:text="Toyota"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<TextView
android:id="@+id/spec"
android:layout_width="181dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:text="Manual, air conditioning, diesel, 8 people"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<TextView
android:id="@+id/price2"
android:layout_width="41dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:text="£7/hr"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<EditText
android:id="@+id/hours2"
android:layout_width="27dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:ems="10"
android:inputType="number"
android:textColor="#DA000000" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/status3"
android:layout_width="53dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<TextView
android:id="@+id/car3"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:text="Jaguar"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<TextView
android:id="@+id/spec2"
android:layout_width="181dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:text="Cruise control, leather interior, automatic, air conditioning, tilt steering wheel, power mirrors, power door locks, 4 people"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<TextView
android:id="@+id/price5"
android:layout_width="41dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:text="£10/hr"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<EditText
android:id="@+id/hours3"
android:layout_width="27dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:ems="10"
android:inputType="number"
android:textColor="#DA000000" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/status4"
android:layout_width="53dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<TextView
android:id="@+id/car4"
android:layout_width="61dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:text="Audi"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<TextView
android:id="@+id/spec3"
android:layout_width="181dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:text="Power steering, power brakes, power locks power windows, air bags, automatic air conditiioning, ABS brakes, 2 people"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<TextView
android:id="@+id/price6"
android:layout_width="41dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:text="£8/hr"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<EditText
android:id="@+id/hours4"
android:layout_width="27dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:ems="10"
android:inputType="number"
android:textColor="#DA000000" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/status5"
android:layout_width="53dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<TextView
android:id="@+id/car5"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:text="Honda"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<TextView
android:id="@+id/spec4"
android:layout_width="181dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:text="Power Locks/Windows, air bags, automatic, air conditioning, 5 people"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<TextView
android:id="@+id/price7"
android:layout_width="41dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:text="£9/hr"
android:textAlignment="center"
android:textColor="#DA000000"
android:textSize="11sp" />
<EditText
android:id="@+id/hours5"
android:layout_width="27dp"
android:layout_height="match_parent"
android:background="@drawable/cell_shape2"
android:ems="10"
android:inputType="number"
android:textColor="#DA000000" />
</TableRow>
</TableLayout>
<TextView
android:id="@+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="Optional Refreshments:"
android:textColor="#000000"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/carTable" />
<Button
android:id="@+id/rentButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="156dp"
android:onClick="clickRent"
android:text="Rent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.866"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView10" />
<Spinner
android:id="@+id/cakeSpinner"
android:layout_width="43dp"
android:layout_height="17dp"
android:layout_marginStart="12dp"
android:layout_marginTop="24dp"
app:layout_constraintStart_toEndOf="@+id/cakeLabel"
app:layout_constraintTop_toBottomOf="@+id/textView10" />
<TextView
android:id="@+id/cakeLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="44dp"
android:layout_marginTop="24dp"
android:text="Cake (£1):"
android:textColor="#E4000000"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView10" />
<Button
android:id="@+id/button"
android:layout_width="94dp"
android:layout_height="47dp"
android:layout_marginStart="52dp"
android:layout_marginTop="12dp"
android:onClick="clickDiscount"
android:text="Click to draw"
android:textSize="11sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView4" />
<TextView
android:id="@+id/discountView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="164dp"
android:text="0%"
android:textColor="#000000"
android:textSize="21sp"
app:layout_constraintEnd_toStartOf="@+id/rentButton"
app:layout_constraintHorizontal_bias="0.494"
app:layout_constraintStart_toEndOf="@+id/button"
app:layout_constraintTop_toBottomOf="@+id/textView10" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".receiptActivity">
<TextView
android:id="@+id/costLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="100dp"
android:layout_marginTop="160dp"
android:text="Sum: "
android:textColor="#000000"
android:textSize="24sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/receiptTitle" />
<TextView
android:id="@+id/receiptTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="128dp"
android:layout_marginTop="16dp"
android:text="Rental Receipt"
android:textColor="#000000"
android:textSize="24sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/costView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="160dp"
android:textColor="#000000"
android:textSize="24sp"
app:layout_constraintStart_toEndOf="@+id/costLabel"
app:layout_constraintTop_toBottomOf="@+id/receiptTitle" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".registerActivity">
<Button
android:id="@+id/register"
android:layout_width="158dp"
android:layout_height="44dp"
android:onClick="registerNewUser"
android:text="@string/register"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/passwordText"
app:layout_constraintVertical_bias="0.125" />
<EditText
android:id="@+id/passwordText"
android:layout_width="299dp"
android:layout_height="54dp"
android:autofillHints=""
android:ems="10"
android:inputType="textPersonName"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pageTitle4"
app:layout_constraintVertical_bias="0.039" />
<EditText
android:id="@+id/usernameText"
android:layout_width="299dp"
android:layout_height="54dp"
android:ems="10"
android:importantForAutofill="no"
android:inputType="textPersonName"
app:layout_constraintBottom_toTopOf="@+id/pageTitle4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pageTitle3"
app:layout_constraintVertical_bias="0.521" />
<TextView
android:id="@+id/pageTitle4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="76dp"
android:text="Password:"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.187"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pageTitle3" />
<TextView
android:id="@+id/pageTitle3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Username:"
android:textSize="24sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.188"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pageTitle2"
app:layout_constraintVertical_bias="0.136" />
<TextView
android:id="@+id/pageTitle2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Name:"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.163"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pageTitle" />
<TextView
android:id="@+id/pageTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="36dp"
android:text="@string/register"
android:textSize="32sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/nameText"
android:layout_width="299dp"
android:layout_height="54dp"
android:ems="10"
android:inputType="textPersonName"
app:layout_constraintBottom_toTopOf="@+id/pageTitle3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pageTitle2"
app:layout_constraintVertical_bias="0.458" />
<Button
android:id="@+id/LoginBack"
android:layout_width="240dp"
android:layout_height="47dp"
android:onClick="loginBack"
android:text="Return To Login"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/passwordText"
app:layout_constraintVertical_bias="0.368" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context=".mainApp"
tools:showIn="@layout/activity_main_app">
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#008577</color>
<color name="colorPrimaryDark">#00574B</color>
<color name="colorAccent">#D81B60</color>
</resources>
<resources>
<dimen name="fab_margin">16dp</dimen>
</resources>
<resources>
<string name="app_name">car_rental_system</string>
<string name="car_rental">Car Rental</string>
<string name="register">Register</string>
<string name="password">Password:</string>
<string name="username">Username:</string>
<string name="title_activity_main_app">mainApp</string>
<string name="name">Name</string>
<string name="car">Car</string>
</resources>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>
package com.example.car_rental_system;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
#Wed Apr 29 18:44:33 BST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
include ':app'
rootProject.name='car_rental_system'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment