Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7570915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:32:17+00:00 2026-05-30T15:32:17+00:00

What i need to do is create an app which will generate a random

  • 0

What i need to do is create an app which will generate a random mathmatical expression for the user to solve based on a difficulty level that they select.

eg. novice: a random operation on 2 terms
easy: random operations on 2 or 3 terms

What I’m struggling with is creating a class to handle the creation of expressions

My Game class is as follows:

package w1279057.CW1;

import android.app.Activity;
import android.os.Bundle;


public class Game extends Activity {

public static final String KEY_DIFFICULTY = "w1279057.CW1.difficulty";
public static final int DIFFICULTY_NOVICE = 0;
public static final int DIFFICULTY_EASY = 1;
public static final int DIFFICULTY_MEDIUM = 2;
public static final int DIFFICULTY_GURU = 3;

private int puzzle[];



@Override   
public void onCreate(Bundle savedInstanceState) {
    int diff = getIntent().getIntExtra(KEY_DIFFICULTY, DIFFICULTY_NOVICE);
    setContentView(R.layout.gameview);
}


}

What i think i need is a class which has methods for generating a specific amount of operations randomly and then generating the random numbers for the expressions as well, once i have a valid expression i need to update a textview to display the expressions.

Am i on the right track?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:32:19+00:00Added an answer on May 30, 2026 at 3:32 pm

    I think this could be a good approach, as you will decouple the mathematical logic from your Activity. So… my advice is to go in this way 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, I need to create an app for work that signs into our website
I have a third-party app that creates HTML-based reports that I need to display.
Need to create a custom DNS name server using C which will check against
I wanna create spring app which will consists of 2 parts : spring backend
I am trying to create an app in which, I need navigation bar button
In my android app, I need to design a Welcome Screen which will be
I need to create reports in a C# .NET Windows app. I've got an
I need to create a command line look-and-feel in a WPF app. In WPF,
In my app, I create view controller objects as I need them. When a
I need to create an XML schema that looks something like this: <xs:element name=wrapperElement>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.