mirror of
https://github.com/hmalik144/Udacity_project_5---ReportCardjavaclass.git
synced 2026-03-17 23:16:09 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package com.example.h_mal.reportcardjavaclass;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumentation 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() throws Exception {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getTargetContext();
|
||||
|
||||
assertEquals("com.example.h_mal.reportcardjavaclass", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
13
app/src/main/AndroidManifest.xml
Normal file
13
app/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.h_mal.reportcardjavaclass">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.example.h_mal.reportcardjavaclass;
|
||||
|
||||
/**
|
||||
* Created by h_mal on 14/01/2017.
|
||||
*/
|
||||
|
||||
public class reportCard {
|
||||
|
||||
/** Student name */
|
||||
private String mStudentName;
|
||||
|
||||
/** Student year group */
|
||||
private String mStudentYear;
|
||||
|
||||
/** Student overall grade */
|
||||
private int mStudentGrade;
|
||||
|
||||
public reportCard (String name, String year, int grade){
|
||||
mStudentName = name;
|
||||
mStudentYear = year;
|
||||
mStudentGrade = grade;
|
||||
}
|
||||
|
||||
/**get student name*/
|
||||
public String getStudentName(){
|
||||
return mStudentName;
|
||||
}
|
||||
/**set student name*/
|
||||
public void setStudentName(String name) {
|
||||
mStudentName = name;
|
||||
|
||||
}
|
||||
/**get student year*/
|
||||
public String getStudentYear(){
|
||||
return mStudentYear;
|
||||
}
|
||||
/**set student year*/
|
||||
public void setStudentyear(String year) {
|
||||
mStudentYear = year;
|
||||
}
|
||||
|
||||
/** get student overall grade*/
|
||||
public int getStudentGrade(){
|
||||
return mStudentGrade;
|
||||
}
|
||||
/**set student overall grade*/
|
||||
public void setStudentGrade(int grade) {
|
||||
mStudentGrade = grade;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return "Student Name: " + mStudentName +"\n" +
|
||||
"Year: " + mStudentYear +"\n" +
|
||||
"Overall Grade: " + mStudentGrade;
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
6
app/src/main/res/values/colors.xml
Normal file
6
app/src/main/res/values/colors.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#3F51B5</color>
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
<color name="colorAccent">#FF4081</color>
|
||||
</resources>
|
||||
3
app/src/main/res/values/strings.xml
Normal file
3
app/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">ReportCard java class</string>
|
||||
</resources>
|
||||
11
app/src/main/res/values/styles.xml
Normal file
11
app/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<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>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.example.h_mal.reportcardjavaclass;
|
||||
|
||||
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() throws Exception {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user