Project 1B: MultiQuiz Multiple Questions

Project 1B: MultiQuiz Multiple Questions
프로젝트 1B: 멀티퀴즈 다중 질문
Due: Sun Sep 15, 2024 11:59pm
Ungraded, 40 Possible Points
In Progress 진행 중
NEXT UP: Submit Assignment
다음: 과제 제출
Unlimited Attempts Allowed
무제한 시도 허용
Available until Sep 17, 2024 11:59pm

MultiQuiz App (Part 2 of 3)
멀티퀴즈 앱 (2부)

In this second part of our MultiQuiz app, we will update our app to handle multiple questions, and properly support device rotation. We will also alter the way that hints work, and change the Reset button to a Submit button.
이 MultiQuiz 앱의 두 번째 부분에서는 여러 질문을 처리하고 장치 회전을 제대로 지원하도록 앱을 업데이트할 것입니다. 또한 힌트 작동 방식을 변경하고 초기화 버튼을 제출 버튼으로 변경할 것입니다.

This project part closely corresponds to Chapters 4 through 6, without the challenges, so you're highly encouraged to follow along and complete those textbook chapters before starting this project. Please be sure to reference the GeoQuiz Updates page for important changes you must apply when completing the GeoQuiz app.
이 프로젝트 부분은 챌린지 없이 4장에서 6장까지의 내용과 밀접하게 관련되어 있으므로, 이 프로젝트를 시작하기 전에 해당 교과서 장을 따라가고 완료하는 것이 좋습니다. GeoQuiz 앱을 완료할 때 적용해야 하는 중요한 변경 사항에 대해서는 GeoQuiz 업데이트 페이지를 참조하십시오.

Getting Started 시작하기

First, make a backup copy of your completed Project 1A, in case there are any questions about your submission (or if you find you want to restart Project 1B from the beginning). The best way to make a backup is to select File | Export | Export to Zip File and select a safe name/location for the backup file (but please don't place the archive within your project directory). The archive will include all your code, assets, resources, and other related source materials, yet exclude any libraries and other artifacts that can be generated or built directly from the sources. To review the state of the system at that time and/or start again, just unzip the zip file into any convenient folder, then use File | Open and navigate to that folder.
먼저, 제출물에 대한 질문이 있거나 Project 1B를 처음부터 다시 시작하고 싶은 경우를 대비하여 완료된 Project 1A의 백업 사본을 만드십시오. 백업을 만드는 가장 좋은 방법은 파일 | 내보내기 | Zip 파일로 내보내기를 선택하고 백업 파일의 안전한 이름/위치를 선택하는 것입니다 (하지만 프로젝트 디렉토리 내에 아카이브를 두지 마십시오). 아카이브에는 모든 코드, 자산, 리소스 및 기타 관련 소스 자료가 포함되지만, 소스에서 직접 생성되거나 빌드할 수 있는 라이브러리 및 기타 아티팩트는 제외됩니다. 그 당시 시스템 상태를 검토하거나 다시 시작하려면, zip 파일을 편리한 폴더에 압축 해제한 다음 파일 | 열기를 사용하여 해당 폴더로 이동하십시오.

Next, you must get some new updates from the remote Git repository that you configured when starting Project 1A. To do this, select Git | Update Project and choose the option to Merge incoming changes.
다음으로, Project 1A를 시작할 때 구성한 원격 Git 저장소에서 새로운 업데이트를 받아야 합니다. 이를 위해 Git | 프로젝트 업데이트를 선택하고 들어오는 변경 사항 병합 옵션을 선택하십시오.

Important: After the merge, please access the main menu (four horizontal lines) then select File | Sync Project with Gradle Files (or just click the little elephant-with-arrow icon near the upper-right) because Android Studio may not perform this sync for you automatically.
중요: 병합 후, 메인 메뉴(네 개의 가로선)를 열고 파일 | Gradle 파일과 프로젝트 동기화(또는 오른쪽 상단 근처의 작은 화살표가 있는 코끼리 아이콘을 클릭) 항목을 선택하십시오. Android Studio가 이 동기화를 자동으로 수행하지 않을 수 있습니다.

These updates provide the following changes specific to Project 1B:
이 업데이트는 Project 1B에 특정한 다음 변경 사항을 제공합니다:

  • build.gradle.kts (Module :app) and libs.versions.toml
    build.gradle.kts (모듈 :app) 및 libs.versions.toml

    • These configuration file have been updated according to BNRG Listing 4.1 to support view models, with the most recent versions
      이 구성 파일은 최신 버전의 뷰 모델을 지원하기 위해 BNRG Listing 4.1에 따라 업데이트되었습니다.
  • Question.kt 질문.kt
    • A new data class, as part of the Model, where each instance holds a single question and a list of its possible Answer objects
      새로운 데이터 클래스는 모델의 일부로, 각 인스턴스는 단일 질문과 가능한 답변 객체 목록을 보유합니다

Please use the above files as provided, without making any changes to them.
제공된 위의 파일들을 변경하지 않고 사용해 주세요.

Persistence of State 상태 지속성

For this part of the project, all mutable state information must be stored in a ViewModel class called QuizViewModel, in order to ensure app state is retained across device rotation.
이 프로젝트의 이 부분에서는 모든 변경 가능한 상태 정보를 QuizViewModel 라는 ViewModel 클래스에 저장해야 하며, 이는 장치 회전 시 앱 상태가 유지되도록 보장합니다.

You must use the techniques described in BNRG Chapter 4. Please be sure to confirm that you're using the 5th Edition of the textbook! Note that the use of techniques from earlier textbook editions will result in a major score deduction.
BNRG 4장에 설명된 기술을 사용해야 합니다. 교과서의 5판을 사용하고 있는지 반드시 확인하세요! 이전 교과서 판의 기술을 사용할 경우 큰 점수 감점이 있을 것입니다.

Please also note that the "Saving Data Across Process Death" section of BNRG Chapter 4 is neither required nor expected for this assignment. You're encouraged to read this section, and implement/test it within the GeoQuiz tutorial, but please don't implement any of Listing 4.8 for Project 1B.
또한 BNRG 4장 "프로세스 종료 시 데이터 저장" 섹션은 이 과제에 필수도 아니고 기대되지도 않는다는 점을 유의하세요. 이 섹션을 읽고 GeoQuiz 튜토리얼 내에서 구현/테스트하는 것은 권장되지만, 프로젝트 1B에서는 Listing 4.8의 어떤 것도 구현하지 마세요.

MultiQuiz Questions and Answers
멀티퀴즈 질문과 답변

You must create four original multiple-choice questions, on any topics of your choice, with four original answer options each. Please don't include any questions from our course materials, and don't use questions from any lists you've found online. Each question should be reasonably short (generally one or two lines) and each answer option should be much shorter (generally one or two words).

To assist with eventual testing, please arrange your answer options such that the first answer option is correct for the first question, the second answer option is correct for the second question, the third answer option is correct for the third question, and the fourth answer option is correct for the fourth question.

Layout

The overall layout should be the same as the layout of Project 1A. When the application is initially launched, the first question should appear, along with its associated answer options. The lifeline (50:50) button should be changed to a Hint button, and the Reset button should be changed to a Submit button.

The android:id values for the action buttons must be as follows:

  • hint_button
  • submit_button

Note that you will also need to assign an ID value of your choice to the question text component, so that you can initialize and modify the text from within the Controller (meaning MainActivity).

The answer button ID values should be as specified in Project 1A. If your answer buttons aren't named correctly, this is an excellent time to change them. These are necessary for testing in the next project.

Behavior

The answer buttons must still behave exactly as described in Project 1A for each question. No changes are needed here.

The behavior of the Hint button (which takes the place of the 50:50 button from Project 1A) is as follows:

  • When the Hint button is clicked, a single answer button is randomly chosen among the currently enabled incorrect answers
    • The chosen button becomes disabled and deselected

The behavior of the Submit button (which takes the place of the Reset button from Project 1A) is as follows:

  • When the Submit button is clicked, the next question and its associated answer buttons are displayed
    • Upon submitting the final question, the first question and its associated buttons are displayed again
      • The enabled/selected state of all buttons should be as they were when that question was most recently submitted

The Hint and Submit buttons should be enabled/disabled based upon the state of the Answer objects (Model). If there are any enabled incorrect answers, then the Hint button should be enabled; otherwise it should be disabled. If there is an answer selected, then the Submit button should be enabled; otherwise it should be disabled.

Here's a short video demonstrating the expected behavior of the app:

Note that the selection of each Hint is necessarily random, so your app is likely to disable answers in a different order from what's shown in the video, and the order is likely to vary each time you restart the app.

All user-facing strings, including each question text, each answer text, and each control button text, must be stored only in the res/values/strings.xml file.

MVC Architecture

You're required to implement proper MVC separation in this assignment. Please see the Project 1A assignment page for more details.

If you notice any cases where the app seems to misbehave when rotating the device or moving to a new question, the most likely issue is an improper MVC implementation, even if you've properly used a ViewModel to store the Model state.

Functional Programming

While developing the app, be sure to use Kotlin's functional programming features, rather than an imperative programming style. In this part of the project, the random and let functions can be useful, in addition to the functions mentioned in Project 1A.

Deliverable

Upload the following two files:

  • MainActivity.kt
    • This activity must define and use QuizViewModel by viewModels() delegation
    • Your name and VT username, as in Project 1A, must be present as comments
  • Screenshot of the Pixel 4 API 32 emulator
    • Please use the screenshot button in the emulator toolbar to capture the image (as in Project 1A)
    • The emulator must display the second quiz question, with the correct (second) answer selected, and any two incorrect answers disabled via hints

Be sure to Submit the uploaded files to complete this assignment.

P1B
CriteriaRatingsPts
P1B
CriteriaRatingsPts
Emulator legibility
5 pts
Clear and legible
5 to >0 pts
Image quality issues
0 pts
Missing
/ 5 pts
Emulator state
12 pts
Expected state
12 to >6 pts
Minor state issues
6 to >0 pts
Major state issues
0 pts
Unexpected state
/ 12 pts
Emulator layout
10 to >5 pts
Expected Layout
5 to >0 pts
Some layout issues
0 pts
Unexpected Layout
/ 10 pts
MainActivity ViewModel property
10 pts
Present and correct
5 pts
Present with issues
property is unused, or is initialized improperly
0 pts
Property missing
/ 10 pts
Proper MVC implementation
3 pts
Proper MVC
2 pts
Mostly proper MVC
1 pts
Some proper MVC
0 pts
Improper MVC
/ 3 pts
Total Points: 0

Choose a submission type

or