Microsoft Visual C#
Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
bartleby

Concept explainers

Question
Book Icon
Chapter 2, Problem 10E
Program Plan Intro

Program Plan:

Following variables are used in the program:

TotalJobMinutes: To the total job minutes value.

Hours: To store the number of hours.

Minutes: To store the number of minutes

Following functions are used in the program:

WriteLine(): To display the hours and minutes value for given total job minutes.

ReadKey(): To end the program after reading a random variable.

Summary Introduction:

Program will use Main() in which value of total minutes involved in a job is stored in variable TotalJobMinutes. Using this value of TotalJobMinutes, number of hours and minutes in it are calculated as quotient and remainder obtained on dividing it by 60 respectively. The value of hours and minutes is then displayed to user using WriteLine() method.

Program Description:

Purpose of the program is to represent the total minutes involved in a job in hours and minutes format.

Blurred answer
Students have asked these similar questions
Write an application that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If the score entered is less than 0 or more than 10, display Score must be between 10 and 0 and do not use the score. After all the scores have been entered, display the number of valid scores entered, the highest score, the lowest score, and the arithmetic average. An example of the program is shown below: Enter a score >> 6 Enter another score or 99 to quit >> 7 Enter another score or 99 to quit >> 9 Enter another score or 99 to quit >> 7 Enter another score or 99 to quit >> 99 4 valid scores were entered Highest was 9 Lowest was 6 Average was 7.25     PLEASE WRITE A JAVA CODE   import java.util.*; public class QuizScoreStatistics {     public static void main (String args[]) {         // Write your code here     } }
Using C# in Microsoft Visual Studio create an application that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows:1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Do not display the computer’s choice yet.)2. The user selects his or her choice of rock, paper, or scissors. To get this input you can use Button controls, or clickable PictureBox controls displaying some of the artwork that you will find in the student sample files.3. The computer’s choice is displayed.4. A winner is selected according to the following rules:• If one player chooses rock and the other player chooses scissors, then rock wins. (Rock smashes scissors.)• If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors…
1# Write a program that allows users to choose from one of three shapes: Squares, Circles or (right) Triangles. Allow the user to use the first letter of the shape (S, C, T) to specify what they want. After the shape is selected, ask the user for the appropriate data to calculate the shape's area, and then and print that area value to the screen for them. Area formulas you can use: Triangle: % base x height Square: length x length Circle: % Pl x radius? Notes: The floating-point data type will be your friend here. Round your area answer so that no more than 2 decimal places are shown when printing on the screen. You can use 3.1415 for Pl; Think about this as a CONSTANT in your code. For this part and especially part (b) below, think about componentizing your code. So one gigantic main() is not a best practice and not what we want to see here. Remember what we discussed about "procedural decomposition" and functions last week!

Chapter 2 Solutions

Microsoft Visual C#

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    Microsoft Visual C#
    Computer Science
    ISBN:9781337102100
    Author:Joyce, Farrell.
    Publisher:Cengage Learning,
    Text book image
    EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781337671385
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
    Text book image
    EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781305480537
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT