Commit 6ff20711 authored by charlie.hamer's avatar charlie.hamer 💬

final commit

parents
*.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
local.properties
# Default ignored files
/shelf/
/workspace.xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenRepo" />
<option name="name" value="MavenRepo" />
<option name="url" value="https://repo.maven.apache.org/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
</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_11" default="true" project-jdk-name="11" 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="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
</set>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitSharedSettings">
<option name="FORCE_PUSH_PROHIBITED_PATTERNS">
<list />
</option>
</component>
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/app/src/main/res" vcs="Git" />
</component>
</project>
\ No newline at end of file
/build
\ No newline at end of file
plugins {
id 'com.android.application'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.museum"
minSdkVersion 26
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'androidx.navigation:navigation-fragment:2.3.0'
implementation 'androidx.navigation:navigation-ui:2.3.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
\ No newline at end of file
# 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
\ No newline at end of file
package com.example.museum;
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.museum", appContext.getPackageName());
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.museum">
<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/Theme.Museum">
<activity android:name=".date"></activity>
<activity android:name=".natural" />
<activity android:name=".receipt" />
<activity android:name=".souvenir" />
<activity android:name=".cafe" />
<activity android:name=".Book" />
<activity android:name=".hermit" />
<activity android:name=".History" />
<activity android:name=".national" />
<activity android:name=".tate" />
<activity android:name=".british" />
<activity android:name=".metro" />
<activity android:name=".vatican" />
<activity android:name=".china2" />
<activity android:name=".Louvre" />
<activity android:name=".main_menu" />
<activity android:name=".Register" />
<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.museum;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class Book extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_book);
}
}
\ No newline at end of file
package com.example.museum;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.navigation.fragment.NavHostFragment;
import com.example.museum.databinding.FragmentFirstBinding;
public class FirstFragment extends Fragment {
private FragmentFirstBinding binding;
@Override
public View onCreateView(
LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState
) {
binding = FragmentFirstBinding.inflate(inflater, container, false);
return binding.getRoot();
}
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
binding.buttonFirst.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
NavHostFragment.findNavController(FirstFragment.this)
.navigate(R.id.action_FirstFragment_to_SecondFragment);
}
});
}
@Override
public void onDestroyView() {
super.onDestroyView();
binding = null;
}
}
\ No newline at end of file
package com.example.museum;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class History extends AppCompatActivity {
static boolean History = false ;
public void setHistory(boolean History) {
this.History = History;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_history);
}
public void back(View v){
Intent i = new Intent(this, main_menu.class);
startActivity(i);
}
public void book(View v){
Intent i = new Intent(this, date.class);
startActivity(i);
setHistory(true);
}
}
\ No newline at end of file
package com.example.museum;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class Louvre extends AppCompatActivity {
static boolean louvre = false ;
public void setlouvre(boolean louvre) {
this.louvre = louvre;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_louvre);
}
public void back(View v){
Intent i = new Intent(this, main_menu.class);
startActivity(i);
}
public void book(View v){
Intent i = new Intent(this, date.class);
startActivity(i);
setlouvre(true);
}
}
\ No newline at end of file
package com.example.museum;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import java.text.BreakIterator;
import static com.example.museum.Register.username;
import static com.example.museum.Register.password;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void next(View v){
Intent i = new Intent(this, Register.class);
startActivity(i);
}
public void log1(View v){
EditText user = (EditText)findViewById(R.id.username);
String username1 = user.getText().toString();
EditText pass = (EditText)findViewById(R.id.password);
String password1 = pass.getText().toString();
if(username1.equals(username)) {
if (password1.equals(password)) {
Intent i = new Intent(this, main_menu.class);
startActivity(i);
}
}
else{TextView t = (TextView) findViewById(R.id.details);
t.setText("Incorrect Details");}
}
}
\ No newline at end of file
package com.example.museum;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
public class Register extends AppCompatActivity{
static String username;
static String password;
public void setUsername(String username) {
this.username = username;
}
public void setPassword(String password) {
this.password = password;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
}
public void next1(View v){
EditText user = (EditText)findViewById(R.id.username2);
String username1 = user.getText().toString();
EditText pass = (EditText)findViewById(R.id.password2);
String password1 = pass.getText().toString();
setUsername(username1);
setPassword(password1);
Intent i = new Intent(this, MainActivity.class);
startActivity(i);
}
}
\ No newline at end of file
package com.example.museum;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.navigation.fragment.NavHostFragment;
import com.example.museum.databinding.FragmentSecondBinding;
public class SecondFragment extends Fragment {
private FragmentSecondBinding binding;
@Override
public View onCreateView(
LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState
) {
binding = FragmentSecondBinding.inflate(inflater, container, false);
return binding.getRoot();
}
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
binding.buttonSecond.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
NavHostFragment.findNavController(SecondFragment.this)
.navigate(R.id.action_SecondFragment_to_FirstFragment);
}
});
}
@Override
public void onDestroyView() {
super.onDestroyView();
binding = null;
}
}
\ No newline at end of file
package com.example.museum;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import static com.example.museum.Register.username;
public class british extends AppCompatActivity {
static boolean british = false ;
public void setbritish(boolean british) {
this.british = british;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_british);
}
public void back(View v){
Intent i = new Intent(this, main_menu.class);
startActivity(i);
}
public void book(View v){
Intent i = new Intent(this, date.class);
startActivity(i);
setbritish(true);
}
}
\ No newline at end of file
package com.example.museum;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class cafe extends AppCompatActivity {
static boolean tea = false ;
static boolean water= false ;
static boolean coffee = false ;
static boolean flatbread = false ;
static boolean sandwich = false ;
static boolean sweetroll = false ;
static boolean salad = false ;
public void settea(boolean tea) {
this.tea = tea;
}
public void setwater(boolean water) {
this.water = water;
}
public void setcoffee(boolean coffee) {
this.coffee = coffee;
}
public void setflatbread(boolean flatbread) {
this.flatbread = flatbread;
}
public void setsandwich(boolean sandwich) {
this.sandwich = sandwich;
}
public void setsweetroll(boolean sweetroll) {
this.sweetroll = sweetroll;
}
public void setsalad(boolean salad) {
this.salad = salad;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_cafe);
}
public void logout(View v){
Intent i = new Intent(this, MainActivity.class);
startActivity(i);
}
public void tea(View v){
settea(true);
}
public void water(View v){
setwater(true);
}
public void coffee(View v){
setcoffee(true);
}
public void flatbread(View v){
setflatbread(true);
}
public void sandwich(View v){
setsandwich(true);
}
public void sweetroll(View v){
setsweetroll(true);
}
public void salad(View v){
setsalad(true);
}
public void order(View v){
Intent i = new Intent(this, souvenir.class);
startActivity(i);
}
}
\ No newline at end of file
package com.example.museum;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
public class china2 extends AppCompatActivity {
static boolean china = false ;
public void setChina(boolean china) {
this.china = china;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_china2);
}
public void back(View v){
Intent i = new Intent(this, main_menu.class);
startActivity(i);
}
public void book(View v){
Intent i = new Intent(this, date.class);
startActivity(i);
setChina(true);
}
}
package com.example.museum;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
public class date extends AppCompatActivity {
static String date;
static String time;
public void setDate(String date) {
this.date = date;
}
public void setTime(String time) {
this.time = time;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_date);
}
public void logout(View v){
Intent i = new Intent(this, MainActivity.class);
startActivity(i);
}
public void order(View v){
EditText user = (EditText)findViewById(R.id.date1);
String date1 = user.getText().toString();
EditText pass = (EditText)findViewById(R.id.time1);
String time1 = pass.getText().toString();
setDate(date1);
setTime(time1);
Intent i = new Intent(this, cafe.class);
startActivity(i);
}}
\ No newline at end of file
package com.example.museum;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class hermit extends AppCompatActivity {
static boolean hermit = false ;
public void sethermit(boolean hermit) {
this.hermit = hermit;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_hermit);
}
public void back(View v){
Intent i = new Intent(this, main_menu.class);
startActivity(i);
}
public void book(View v){
Intent i = new Intent(this, date.class);
startActivity(i);
sethermit(true);
}
}
\ No newline at end of file
package com.example.museum;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
public class main_menu extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_mainmenu);
}
public void out(View v){
Intent i = new Intent(this, MainActivity.class);
startActivity(i);
}
public void louvre1(View v){
Intent i = new Intent(this, Louvre.class);
startActivity(i);
}
public void china(View v){
Intent i = new Intent(this, china2.class);
startActivity(i);
}
public void vatican(View v){
Intent i = new Intent(this, vatican.class);
startActivity(i);
}
public void metro(View v){
Intent i = new Intent(this, metro.class);
startActivity(i);
}
public void british(View v){
Intent i = new Intent(this, british.class);
startActivity(i);
}
public void tate(View v){
Intent i = new Intent(this, tate.class);
startActivity(i);
}
public void history(View v){
Intent i = new Intent(this, History.class);
startActivity(i);
}
public void national(View v){
Intent i = new Intent(this, national.class);
startActivity(i);
}
public void natural(View v){
Intent i = new Intent(this, natural.class);
startActivity(i);
}
public void hermit(View v){
Intent i = new Intent(this, hermit.class);
startActivity(i);
}
}
package com.example.museum;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class metro extends AppCompatActivity {
static boolean metro = false ;
public void setmetro(boolean metro) {
this.metro = metro;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_metro);
}
public void back(View v){
Intent i = new Intent(this, main_menu.class);
startActivity(i);
}
public void book(View v){
Intent i = new Intent(this, date.class);
startActivity(i);
setmetro(true);
}
}
\ No newline at end of file
package com.example.museum;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class national extends AppCompatActivity {
static boolean national = false ;
public void setnational(boolean national) {
this.national = national;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_national);
}
public void back(View v){
Intent i = new Intent(this, main_menu.class);
startActivity(i);
}
public void book(View v){
Intent i = new Intent(this, date.class);
startActivity(i);
setnational(true);
}
}
\ No newline at end of file
package com.example.museum;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class natural extends AppCompatActivity {
static boolean natural = false ;
public void setnatural(boolean natural) {
this.natural = natural;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_natural);
}
public void back(View v){
Intent i = new Intent(this, main_menu.class);
startActivity(i);
}
public void book(View v){
Intent i = new Intent(this, date.class);
startActivity(i);
setnatural(true);
}
}
\ No newline at end of file
package com.example.museum;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.provider.Settings;
import android.view.View;
import android.widget.TextView;
import static com.example.museum.Register.username;
import static com.example.museum.british.british;
import static com.example.museum.china2.china;
import static com.example.museum.hermit.hermit;
import static com.example.museum.History.History;
import static com.example.museum.Louvre.louvre;
import static com.example.museum.metro.metro;
import static com.example.museum.national.national;
import static com.example.museum.natural.natural;
import static com.example.museum.tate.tate;
import static com.example.museum.vatican.vatican;
import static com.example.museum.date.date;
import static com.example.museum.date.time;
import static com.example.museum.cafe.tea;
import static com.example.museum.cafe.water;
import static com.example.museum.cafe.coffee;
import static com.example.museum.cafe.sandwich;
import static com.example.museum.cafe.flatbread;
import static com.example.museum.cafe.sweetroll;
import static com.example.museum.cafe.salad;
import static com.example.museum.souvenir.shirt;
import static com.example.museum.souvenir.hat;
import static com.example.museum.souvenir.snowglobe;
import static com.example.museum.souvenir.keychain;
import static com.example.museum.souvenir.bottle;
import static com.example.museum.souvenir.mug;
import static com.example.museum.souvenir.coaster; //import all global variables
public class receipt extends AppCompatActivity {
public int food=0;
public int items=0;
public int cost=0;
public int museumcost=0; //keeps track of cost
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_receipt);
if(tea == true)//the formatting for this page was awful, so the text is out of line
food = food + 1;
if(water == true)
food = food + 1;
if(coffee == true)
food = food + 2;
if(sandwich ==true)
food = food + 2;
if(flatbread == true)
food = food + 2;
if(sweetroll == true)
food = food + 2;
if(salad == true)
food = food + 2;
if(shirt == true)
items = items + 10;
if(hat == true)
items = items + 5;
if(snowglobe == true)
items = items + 5;
if(keychain == true)
items = items + 5;
if(bottle == true)
items = items + 5;
if(mug == true)
items = items + 5;
if(coaster == true)
items = items + 2;
TextView p = (TextView) findViewById(R.id.snacks);
p.setText(String.valueOf(food));
TextView c = (TextView) findViewById(R.id.souvenir);
c.setText(String.valueOf(items));
TextView t = (TextView) findViewById(R.id.name);
t.setText(username); //and reset the display
TextView e = (TextView) findViewById(R.id.date);
e.setText(date);
TextView f = (TextView) findViewById(R.id.time);
f.setText(time);
TextView h= (TextView) findViewById(R.id.rng);
h.setText("000-493");
TextView i = (TextView) findViewById(R.id.museum);
if(british== true) {
i.setText("British Museum");
museumcost=museumcost+10;
}
if(china== true) {
i.setText("National Museum of China");
museumcost=museumcost+10;
}
if(hermit== true) {
i.setText("State Hermatige Museum");
museumcost=museumcost+5;
}
if(History== true) {
i.setText("American Museum of Natural History");
museumcost=museumcost+5;
}
if(louvre == true) {
i.setText("The Louvre");
museumcost=museumcost+10;
}
if(metro == true) {
i.setText("Metropolitan Museum of Art");
museumcost=museumcost+10;
}
if(national == true) {
i.setText("National Gallery");
museumcost=museumcost+5;
}
if(natural == true) {
i.setText("Natural History Museum");
museumcost=museumcost+5;
}
if(tate == true) {
i.setText("Tate Modern");
museumcost=museumcost+5;
}
if(vatican == true) {
i.setText("Vatican Museums");
museumcost=museumcost+10;
}
cost = items + food + museumcost;
TextView v = (TextView) findViewById(R.id.cost);
v.setText(String.valueOf(cost));
}
public void logout(View v) {
Intent i = new Intent(this, MainActivity.class);
startActivity(i);
}
}
\ No newline at end of file
package com.example.museum;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class souvenir extends AppCompatActivity {
static boolean shirt = false ;
static boolean hat= false ;
static boolean snowglobe = false ;
static boolean keychain = false ;
static boolean bottle = false ;
static boolean mug = false ;
static boolean coaster = false ;
public void setshirt(boolean shirt) {
this.shirt = shirt;
}
public void sethat(boolean hat) {
this.hat = hat;
}
public void setsnowglobe(boolean snowglobe) {
this.snowglobe = snowglobe;
}
public void setkeychain(boolean keychain) {
this.keychain = keychain;
}
public void setbottle(boolean bottle) {
this.bottle = bottle;
}
public void setmug(boolean mug) {
this.mug = mug;
}
public void setcoaster(boolean coaster) {
this.coaster = coaster;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_souvenir);
}
public void shirt(View v){
setshirt(true);
}
public void hat(View v){
sethat(true);
}
public void snowglobe(View v){
setsnowglobe(true);
}
public void keychain(View v){
setkeychain(true);
}
public void bottle(View v){
setbottle(true);
}
public void mug(View v){
setmug(true);
}
public void coaster(View v){
setcoaster(true);
}
public void logout(View v){
Intent i = new Intent(this, MainActivity.class);
startActivity(i);
}
public void order(View v){
Intent i = new Intent(this, receipt.class);
startActivity(i);
}
}
\ No newline at end of file
package com.example.museum;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class tate extends AppCompatActivity {
static boolean tate = false ;
public void settate(boolean tate) {
this.tate = tate;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tate);
}
public void back(View v){
Intent i = new Intent(this, main_menu.class);
startActivity(i);
}
public void book(View v){
Intent i = new Intent(this, date.class);
startActivity(i);
settate(true);
}
}
\ No newline at end of file
package com.example.museum;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class vatican extends AppCompatActivity {
static boolean vatican = false ;
public void setvatican(boolean vatican) {
this.vatican = vatican;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_vatican);
}
public void back(View v){
Intent i = new Intent(this, main_menu.class);
startActivity(i);
}
public void book(View v){
Intent i = new Intent(this, date.class);
startActivity(i);
setvatican(true);
}
}
\ No newline at end of file
package com.example.museum;
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()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
\ No newline at end of file
# 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=-Xmx2048m -Dfile.encoding=UTF-8
# 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
\ No newline at end of file
#Sat May 08 16:09:35 BST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
#!/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
rootProject.name = "Museum"
include ':app'
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