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
bekas [8.4K]
3 years ago
11

What connections do you see between variables and what you learned about the Input-Output-Store-Process model of a computer?

Computers and Technology
1 answer:
vladimir1956 [14]3 years ago
4 0

Answer:

h

Explanation:

You might be interested in
Create a GUI application that allows the user to select a rate category (from a set of radio buttons), and enter the number of m
aniked [119]

Answer:

Kindly note that, you're to replace "at" with shift 2 as the brainly text editor can't take the symbol

Explanation:

Below is the Java Swing implementation of the assignment.

=========================== LongDistance.java ====================================

import java.awt.GridLayout;

import javax.swing.*;

public class LongDistance extends JFrame{

 

  /**

  *

  */

  public static float rate;

  public static float minutes;

  public static float total;

 

  LongDistance(){

     

     

      RatePanel rp = new RatePanel();

     

      MinutesPanel mp = new MinutesPanel();

     

      ButtonsPanel bp = new ButtonsPanel();

     

      this.setLayout(new GridLayout(3, 1));

     

 

     

      this.add(rp);

      this.add(mp);

      this.add(bp);

             

      this.setDefaultCloseOperation(EXIT_ON_CLOSE);

      this.setSize(250, 250);

      this.setVisible(true);

  }

 

}

============================ RatePanel.java ==================================

import java.awt.Dimension;

import java.awt.GridLayout;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import javax.swing.BorderFactory;

import javax.swing.ButtonGroup;

import javax.swing.JPanel;

import javax.swing.JRadioButton;

import javax.swing.border.Border;

public class RatePanel extends JPanel implements ActionListener {

  /**

  *

  */

  private JRadioButton jr1, jr2, jr3;

  RatePanel(){

     

      Border panelBorder = BorderFactory.createTitledBorder("Select a Rate Category");

     

     

      jr1 = new JRadioButton("Daytime ($0.7) per minute");

      jr2 = new JRadioButton("Evening ($0.12) per minute");

      jr3 = new JRadioButton("Off-Peak ($0.05) per minute");

      ButtonGroup bg = new ButtonGroup();

     

      this.setLayout(new GridLayout(3,1));

      this.setBorder(panelBorder);

      this.setPreferredSize(new Dimension(800, 150));

     

      this.add(jr1);

      this.add(jr2);

      this.add(jr3);

     

      bg.add(jr1);

      bg.add(jr2);

      bg.add(jr3);

     

      jr1.addActionListener(this);

      jr2.addActionListener(this);

      jr3.addActionListener(this);

         

  }

  "at"Override

  public void actionPerformed(ActionEvent arg0) {

      // TODO Auto-generated method stub

     

      if(arg0.getSource() == jr1){

          LongDistance.rate = 0.07f;

      }

     

      if(arg0.getSource() == jr2){

          LongDistance.rate = 0.12f;

      }

     

      if(arg0.getSource() == jr3){

          LongDistance.rate = 0.05f;

      }

     

  }

}

=============================== MinutesPanel.java =============================

import java.awt.Dimension;

import java.awt.GridLayout;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import java.awt.event.KeyEvent;

import java.awt.event.KeyListener;

import javax.swing.*;

import javax.swing.border.Border;

import javax.swing.event.DocumentListener;

public class MinutesPanel extends JPanel implements KeyListener{

  JTextField jt;

 

  MinutesPanel(){

      Border panelBorder = BorderFactory.createTitledBorder("Time Of Call");

     

      this.setLayout(new GridLayout(1, 2));

     

      JLabel jl = new JLabel("Minutes: ");

      jt = new JTextField();

     

jt.setBounds(50,50,150,20);

      this.setPreferredSize(new Dimension(10, 10));

      this.setBorder(panelBorder);

      this.add(jl);

      this.add(jt);

     

      jt.addKeyListener(this);

 

     

     

     

  }

  "at"Override

  public void keyPressed(KeyEvent arg0) {

      // TODO Auto-generated method stub

     

  }

  "at"Override

  public void keyReleased(KeyEvent arg0) {

      // TODO Auto-generated method stub

      if(jt.getText() != "")

          LongDistance.minutes = Float.parseFloat(jt.getText());

  }

  "at"Override

  public void keyTyped(KeyEvent arg0) {

      // TODO Auto-generated method stub

     

     

  }

 

}

============================= ButtonsPanel.java ============================

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import javax.swing.JButton;

import javax.swing.JOptionPane;

import javax.swing.JPanel;

public class ButtonsPanel extends JPanel implements ActionListener{

  JButton calculate;

  JButton exit;

  ButtonsPanel(){

      calculate = new JButton("Calculate Charges");

      exit = new JButton("Exit");

     

      this.add(calculate);

      this.add(exit);

     

      calculate.addActionListener(this);

      exit.addActionListener(this);

     

  }

  "at"Override

  public void actionPerformed(ActionEvent arg0) {

      // TODO Auto-generated method stub

     

      if(arg0.getSource() == calculate){

                     

          System.out.println("r " + LongDistance.rate);

          System.out.println("m " + LongDistance.minutes);

         

          LongDistance.total = LongDistance.rate * LongDistance.minutes;

          JOptionPane.showMessageDialog(null, "Total Charges: " +LongDistance.total);

         

      }

     

      if(arg0.getSource() == exit){

          System.exit(0);

      }

  }

}

============================ App.java==============================

public class App {

  public static void main(String[] args) {

     

      LongDistance ld = new LongDistance();

     

  }

}

Check the output below

6 0
4 years ago
Martha is a healer, a healthcare provider, and an experienced nurse. She wants to share her daily experiences, as well as her 12
STALIN [3.7K]
The answer to the question is blog.
4 0
4 years ago
Read 2 more answers
Write a program that asks length and breadth of a rectangle a calculate its area qbasic​
Natasha_Volkova [10]

Answer:

INPUT "Enter the length";l

INPUT "Enter the width";w

PRINT "The area is ";l*w

5 0
3 years ago
Write a method , getemailusername, that is passed a string argument that is an email address and returns the user-name part. so
MissTica
<span>public String getemailssername (String aUser) { return aUser.substring(0, aUser.indexOf("@")); }</span>
4 0
3 years ago
What mode is generally used when delivering a presentation to an audience?
dybincka [34]

Answer:

delivery mode

Explanation:

there it is

7 0
3 years ago
Read 2 more answers
Other questions:
  • List several things that geographers can map using remotely sensed data
    5·1 answer
  • What will happen if a user clears the analytics cookie from their browser?
    7·1 answer
  • WILL GIVE BRAINLIEST!!!!!!!!
    6·1 answer
  • A radiologist’s computer monitor has higher resolution than most computer screens. Resolution refers to the:______
    15·1 answer
  • In computer Drag and Drop“ means to select the items, hold down the mouse and
    15·1 answer
  • Which of the following scan only works if operating system’s TCP/IP implementation is based on RFC 793?
    12·1 answer
  • A device that allows multiple computers to communicate with each other is
    9·1 answer
  • 9.6 Code Practice<br> Instructions<br> 1<br> Declare a 4x 5 array called N<br><br> Please helppp
    9·1 answer
  • Read the Python program below: num1 = int(input()) num2 = 10 + num1 * 2 print(num2) num1 = 20 print(num1) Question 1 When this p
    6·1 answer
  • What is the complete path and filename of the file where ports and their associated protocols are defined
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!