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
g100num [7]
3 years ago
12

Write two statements to read in values for birthMonth followed by birthYear, separated by a space. Write a statement to print th

e date using the format birthMonth/birthYear. Ex: 1 2000 (User's input) 1/2000 (Program's output)
Computers and Technology
1 answer:
Ede4ka [16]3 years ago
5 0

Answer:

// here is code in the C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main() {

// variable to store the input

int birth_month,birth_year;

cout<<"enter birth month:";

// read the birth month

cin>>birth_month;

cout<<"enter birth year:";

// read the birth year

cin>>birth_year;

// print the output

cout<<birth_month<<"/"<<birth_year<<endl;

return 0;

}

Explanation:

Declare two variables to store the birth month and birth year.Read the inputs from the user and assign it the variables.Print the birth month and year separated by a slash "/".

Output:

enter birth month:1                                                                                                        

enter birth year:2000                                                                                                      

1/2000

You might be interested in
1. The trucks hauling asphalt have a maximum capacity of 5 US tons (10,000 lbs) 2. The standard road lane is 12 feet wide. 3. As
ivolga24 [154]

Answer:

please write in a better way, and make it easy for us to read.

5 0
4 years ago
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
The leading membranophone in "Kan andi ghazal" is the ________. (If you can not access the audio file here, please go to modules
ICE Princess25 [194]

Answer:

Tabl Baladi

Explanation:

The Tabl Baladi is a large drum with wood frame and heavy skin on both sides. It is hung by a belt around the player's shoulder is and played with two sticks: the thick one is for the dum sound played with the dominant hand, and the thin stick is for the tak sound played with the other hand.

It is mostly used in classical Arab (Middle Eastern) music. Kan Andi Ghazal is a song by the Lebanese musician Wael Jassar.

5 0
4 years ago
Jack is part of the software quality assurance team in a company. Which activity should Jack perform as a part of software quali
gizmo_the_mogwai [7]

Answer:

C - testing

Explanation:

quality assurance is another name for verifying something. so when you verify software, you test the software.

3 0
3 years ago
Web browsers are used to browse the world wide web.
VikaD [51]
No its actually used for looking up concerns, questions, or rumours
3 0
4 years ago
Read 2 more answers
Other questions:
  • Sam wants to move across the text in his documents to add data at predefined stops. Which key will he use to navigate through th
    13·2 answers
  • The use of computer and special software packages to create and edit documents
    11·1 answer
  • What are the disadvantages of cloud computing?
    9·1 answer
  • A graphic design student is putting the finishing touches on her PowerPoint presentation for her speech. She is carefully analyz
    12·1 answer
  • A page can have High needs met rating even if it is not related To the topic of the query​
    9·1 answer
  • A technician is trouble-shooting an IDE hard drive that is emitting a humming sound. They suspect a faulty connector. Which of t
    6·1 answer
  • What does the term measure refer to in typography
    7·2 answers
  • A network technician has created a network consisting of an external internet connection, a DMZ,
    14·1 answer
  • A(n) _____ is any group of characters enclosed within either double or single quotation marks in javascript.
    9·1 answer
  • write a program that computes an integer's checksum. to compute the checksum, break the integer into its constituent
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!