1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
EastWind [94]
3 years ago
6

Develop an algorithm which incorporates decision making and Boolean logic, create a flowchart, and then develop the code. The al

gorithm could be a classification algorithm, a process for solving a problem, or a few questions which help a user buy a car.
Computers and Technology
1 answer:
kenny6666 [7]3 years ago
3 0

Answer:

public class DecisionMaking{

private boolean decision;

Scanner input = new Scanner(System.in);

public void askQuestions(){

// 1, 2, 3, 4 questions

// take note each time a user answers yes or no

// have a counter for these answers

// ex: if user answers 3 out of 4 questions then recommend a specific car

String userInput = "";

int yesCounter = 0;

int noCounter = 0;

System.out.println("Would you like a car with a hatchback?");

userInput = input.nextLine();

addCounter(userInput);

// ask the next question....and so on.

}

//make method for increasing counters

public void addCounter(String answer){

if(answer.equals("yes") || answer.equals("Yes")){

yesCounter++;

}

else{

noCounter++;

}

public static void main(String[] args){

DecisionMaking obj1 = new DecisionMaking();

// make a questionare where you ask the user different questions about a car

// make 4 questions

obj1.askQuetions();

}

}

Explanation:

You might be interested in
What would happen to a eukaryotic cell if all its mitochondriawere destroyed
julsineya [31]
The cell won't reproduce ATP.
4 0
3 years ago
And, or, not are examples of boolean logic
forsale [732]

true a example  boolean logic is (and, or, and  not)

-scav

8 0
3 years ago
Which type of information should never be given out on social media?
zhenek [66]

Answer:

Sites like Face.book are full of valuable data for people who use social engineering to steal your identity on social media. You should therefore avoid sharing information that's used to verify your identity,

Explanation:

7 0
3 years ago
Read 2 more answers
Using this statement to answer the following question “FIFA World Cup 2010: (1+9) From Today!” (Ignore Quotation)
Yuliya22 [10]
Free space going around the town states
5 0
3 years ago
Can someone tell me how to fix the keyboard on ipad?- its in the middle of my screen andd i dont know how to do it
mamaluj [8]

Answer:

Here

Explanation:

To move keyboard to bottom of screen, you just need to tap and hold the keyboard icon at the bottom-right corner of the keyboard, choose Dock option. To fix iPad keyboard in middle of screen, please tap and hold the keyboard icon, then choose Dock.Nov 5, 2020

5 0
3 years ago
Other questions:
  • Leslie’s form collected a huge amount of data. Over time the employees felt that the applications slowed down. What should lesli
    12·1 answer
  • Which of the following is a category of social media?
    8·2 answers
  • How many inches do a tire have to be to sometimes be refer as bald of balding tries
    14·1 answer
  • Write a class "Dog" with a private int field called months and two public member functions setAge and GetStage. setAge takes as
    13·1 answer
  • A ________ is a single media file including art, sound, animation, or movies.
    9·1 answer
  • Define a class called Counter. An object of this class is used to count things so it records a count that is a non-negative whol
    12·1 answer
  • Swapping two input integers if they are not the same. (use switch-case
    10·1 answer
  • Which field would best function as a primary key for a table that tracks orders?
    11·2 answers
  • Can you exclude header rows from sort in excel?
    8·1 answer
  • A classic game, Wario Land, has an invincible main character who reacts to the environment in order to solve puzzles. So, for ex
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!