diff --git a/App.js b/App.js
new file mode 100644
index 00000000..e894b486
--- /dev/null
+++ b/App.js
@@ -0,0 +1,22 @@
+
+import React from 'react';
+import { NavigationContainer } from '@react-navigation/native';
+import { createStackNavigator } from '@react-navigation/stack';
+import QuizScreen from './QuizScreen';
+import ResultsScreen from './ResultsScreen';
+
+const Stack = createStackNavigator();
+
+function App() {
+ return (
+
+
+
+
+
+
+ );
+}
+
+export default App;
+
\ No newline at end of file
diff --git a/QuizScreen.js b/QuizScreen.js
new file mode 100644
index 00000000..29faa0f8
--- /dev/null
+++ b/QuizScreen.js
@@ -0,0 +1,61 @@
+
+import React, { useState, useEffect } from 'react';
+import { View, Text, Button, StyleSheet } from 'react-native';
+import { useDispatch, useSelector } from 'react-redux';
+import { setQuestion, setScore, nextQuestion } from './redux/actions';
+import { questions } from './data/questions.json';
+
+const QuizScreen = ({ navigation }) => {
+ const dispatch = useDispatch();
+ const currentQuestionIndex = useSelector((state) => state.currentQuestionIndex);
+ const score = useSelector((state) => state.score);
+
+ const [timer, setTimer] = useState(30);
+
+ useEffect(() => {
+ dispatch(setQuestion(questions[0]));
+ }, []);
+
+ useEffect(() => {
+ if (timer > 0) {
+ const interval = setInterval(() => setTimer((prev) => prev - 1), 1000);
+ return () => clearInterval(interval);
+ }
+ }, [timer]);
+
+ const handleAnswer = (selectedAnswer) => {
+ const correctAnswer = questions[currentQuestionIndex].answer;
+ if (selectedAnswer === correctAnswer) {
+ dispatch(setScore(score + 1));
+ }
+ dispatch(nextQuestion());
+ };
+
+ const currentQuestion = questions[currentQuestionIndex];
+
+ return (
+
+ {currentQuestion.question}
+ {currentQuestion.options.map((option, idx) => (
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ padding: 20,
+ },
+ question: {
+ fontSize: 20,
+ marginBottom: 20,
+ },
+});
+
+export default QuizScreen;
+
\ No newline at end of file
diff --git a/ResultsScreen.js b/ResultsScreen.js
new file mode 100644
index 00000000..4af77a8e
--- /dev/null
+++ b/ResultsScreen.js
@@ -0,0 +1,39 @@
+
+import React from 'react';
+import { View, Text, Button, StyleSheet } from 'react-native';
+import { useDispatch, useSelector } from 'react-redux';
+import { resetGame } from './redux/actions';
+
+const ResultsScreen = ({ navigation }) => {
+ const score = useSelector((state) => state.score);
+
+ const dispatch = useDispatch();
+
+ const handleRestart = () => {
+ dispatch(resetGame());
+ navigation.navigate('Quiz');
+ };
+
+ return (
+
+ Your Score: {score}
+
+
+ );
+};
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'center',
+ alignItems: 'center',
+ padding: 20,
+ },
+ result: {
+ fontSize: 24,
+ marginBottom: 20,
+ },
+});
+
+export default ResultsScreen;
+
\ No newline at end of file
diff --git a/actions.js b/actions.js
new file mode 100644
index 00000000..b857687d
--- /dev/null
+++ b/actions.js
@@ -0,0 +1,19 @@
+
+export const setQuestion = (question) => ({
+ type: 'SET_QUESTION',
+ payload: question,
+});
+
+export const setScore = (score) => ({
+ type: 'SET_SCORE',
+ payload: score,
+});
+
+export const nextQuestion = () => ({
+ type: 'NEXT_QUESTION',
+});
+
+export const resetGame = () => ({
+ type: 'RESET_GAME',
+});
+
\ No newline at end of file
diff --git a/questions.json b/questions.json
new file mode 100644
index 00000000..4664811b
--- /dev/null
+++ b/questions.json
@@ -0,0 +1,36 @@
+
+{
+ "questions": [
+ {
+ "id": 1,
+ "domain": "Perform Ultrasound Examinations",
+ "question": "Which of the following is the primary reason to use a warm gel during an abdominal ultrasound?",
+ "options": [
+ "Enhance acoustic impedance mismatch",
+ "Improve patient comfort and reduce motion",
+ "Increase frequency penetration",
+ "Reduce lateral resolution"
+ ],
+ "answer": "Improve patient comfort and reduce motion",
+ "explanation": "Warm gel helps relax the patient, reducing involuntary motion that could degrade image quality.",
+ "reference": "ARDMS SPI Content Outline — Patient Care; AIUM Practice Parameter for Ultrasound Examinations",
+ "difficulty": "easy"
+ },
+ {
+ "id": 2,
+ "domain": "Perform Ultrasound Examinations",
+ "question": "When obtaining a longitudinal view of the liver, which anatomic landmark helps confirm proper scan orientation?",
+ "options": [
+ "Gallbladder",
+ "Portal vein",
+ "Falciform ligament",
+ "Hepatic artery"
+ ],
+ "answer": "Falciform ligament",
+ "explanation": "The falciform ligament is a reliable midline landmark in longitudinal liver scans.",
+ "reference": "AIUM Abdominal Ultrasound Guidelines",
+ "difficulty": "easy"
+ }
+ ]
+}
+
\ No newline at end of file
diff --git a/reducer.js b/reducer.js
new file mode 100644
index 00000000..aa743d38
--- /dev/null
+++ b/reducer.js
@@ -0,0 +1,28 @@
+
+const initialState = {
+ score: 0,
+ currentQuestionIndex: 0,
+};
+
+const quizReducer = (state = initialState, action) => {
+ switch (action.type) {
+ case 'SET_QUESTION':
+ return { ...state, currentQuestion: action.payload };
+ case 'SET_SCORE':
+ return { ...state, score: action.payload };
+ case 'NEXT_QUESTION':
+ const nextIndex = state.currentQuestionIndex + 1;
+ return {
+ ...state,
+ currentQuestionIndex: nextIndex,
+ currentQuestion: questions[nextIndex],
+ };
+ case 'RESET_GAME':
+ return initialState;
+ default:
+ return state;
+ }
+};
+
+export default quizReducer;
+
\ No newline at end of file