Initial commit

This commit is contained in:
2017-06-05 18:14:26 +01:00
commit ba8302fe67
31 changed files with 604 additions and 0 deletions

View File

@@ -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());
}
}

View 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>

View File

@@ -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.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View 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>

View File

@@ -0,0 +1,3 @@
<resources>
<string name="app_name">ReportCard java class</string>
</resources>

View 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>

View File

@@ -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);
}
}