Java Programming, Loose-Leaf Version
Java Programming, Loose-Leaf Version
9th Edition
ISBN: 9781337685900
Author: FARRELL, Joyce
Publisher: Cengage Learning
Expert Solution & Answer
Book Icon
Chapter 3, Problem 6PE

Explanation of Solution

Program code:

BookStoreCredit.java

//import the required packages

import java.util.Scanner;

//define a class BookStoreCredit

public class BookStoreCredit

{

//define the main method

public static void main(String[] args)

{

//create object of Scanner

Scanner scanner = null;

//create a try...catch block

try

{

//scannner object

scanner = new Scanner(System.in);

// prompt to read name of student

System.out.print("Enter the Student name:");

//get the name to studentName

String studentName = scanner.next();

// prompt to read grade point average of student

System.out.print("Enter the Student grade point average:");

//get the input to gradePointAvg

double gradePointAvg = scanner.nextDouble();

// method call

display(studentName, gradePointAvg);

        //catch the exception e

} catch (Exception e)

{

}

}

//define a method display()

public static void display(String studentName, double gradePointAvg)

{

//print the values

System.out.println("Student Name:" + studentName);

System.out.println("Grade point Average:" + gradePointAvg);

// compute the credit and display

System...

Blurred answer
Students have asked these similar questions
We are considering the RSA encryption scheme. The involved numbers are small, so the communication is insecure.  Alice's public key (n,public_key) is (247,7). A code breaker manages to factories  247 = 13 x 19  Determine Alice's secret key. To solve the problem, you need not use the extended Euclid algorithm, but you may assume that her private key is one of the following numbers 31,35,55,59,77,89.
Consider the following Turing Machine (TM). Does the TM halt if it begins on the empty tape? If it halts, after how many steps? Does the TM halt if it begins on a tape that contains a single letter A followed by blanks? Justify your answer.
Pllleasassseee ssiiirrrr soolveee thissssss questionnnnnnn
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781337671385
    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
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,