MINDTAPV2.0 JAVA PROGRAMMING 2021, 1TERM
MINDTAPV2.0 JAVA PROGRAMMING 2021, 1TERM
9th Edition
ISBN: 9780357505526
Author: FARRELL
Publisher: CENGAGE L
bartleby

Videos

Question
Book Icon
Chapter 13, Problem 8PE

a.

Program Plan Intro

Student progression

Program plan:

  • Import necessary packages and create a class “StudentsStanding”,
    • Define the method “main()”,
      • Create “Scanner” object.
      • Get both the file paths.
      • Initialize required string and final variables.
      • Set the cutoff value for grade point average.
      • Execute “try” statement,
        • Create output stream object.
        • Create object for “BufferedWriter”.
        • Create another output stream object.
        • Create another object for “BufferedWriter”.
        • Prompt the user to enter student id.
        • Get the student id from the user.
        • Execute “while” loop till the string is equal to “zzz”,
          • Prompt the user to enter first name.
          • Get the first name from the user.
          • Prompt the user to enter last name.
          • Get the last name from the user.
          • Prompt the user to enter grade point average.
          • Get the grade point average from the user.
          • Concatenate the resultant string.
          • Check if gpa is less than cutoff value,
            • Write the data into the corresponding file.
          • Otherwise,
            • Write the data into another file.
          • Prompt the user to enter the input.
          • Get the input from the user.
        • Close both the files.
      • Catch if exception occurs,
        • Handle the exception.

b.

Program Plan Intro

Printing the details of student progression

Program plan:

  • Import necessary packages and create a class “StudentsStanding2”,
    • Define the method “main()”,
      • Get both the file paths.
      • Initialize required string variable.
      • Execute “try” statement,
        • Create input stream object.
        • Create object for “BufferedReader”.
        • Create another input stream object.
        • Create another object for “BufferedReader”.
        • Print heading.
        • Read line from a file.
        • Execute till there are records,
          • Call the method “display()”.
          • Read next line from a file.
        • Print another heading.
        • Read line from another file.
        • Execute till there are records,
          • Call the method “display()”.
          • Read next line from a file.
        • Close both the files.
      • Catch if exception occurs,
        • Handle the exception.
    • Define the method “display()”,
      • Create string array.
      • Declare necessary variables.
      • Set the cutoff value.
      • Split the values using the delimiter “,”.
      • Assign the value for string id.
      • Assign the value for first name.
      • Assign the value for last name.
      • Assign the value for gpa.
      • Print the resultant string to the console.

Blurred answer
Students have asked these similar questions
D. S. Malik, Data Structures Using C++, 2nd Edition, 2010
Methods (Ch6) - Review 1. (The MyRoot method) Below is a manual implementation of the Math.sqrt() method in Java. There are two methods, method #1 which calculates the square root for positive integers, and method #2, which calculates the square root of positive doubles (also works for integers). public class SquareRoot { public static void main(String[] args) { } // implement a loop of your choice here // Method that calculates the square root of integer variables public static double myRoot(int number) { double root; root=number/2; double root old; do { root old root; root (root_old+number/root_old)/2; } while (Math.abs(root_old-root)>1.8E-6); return root; } // Method that calculates the square root of double variables public static double myRoot(double number) { double root; root number/2; double root_old; do { root old root; root (root_old+number/root_old)/2; while (Math.abs (root_old-root)>1.0E-6); return root; } } Program-it-Yourself: In the main method, create a program that…
I would like to know the main features about the following 3 key concepts:1. Backup Domain Controller (BDC)2. Access Control List (ACL)3. Dynamic Memory

Chapter 13 Solutions

MINDTAPV2.0 JAVA PROGRAMMING 2021, 1TERM

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
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
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
C - File I/O; Author: Tutorials Point (India) Ltd.;https://www.youtube.com/watch?v=cEfuwpbGi1k;License: Standard YouTube License, CC-BY
file handling functions in c | fprintf, fscanf, fread, fwrite |; Author: Education 4u;https://www.youtube.com/watch?v=aqeXS1bJihA;License: Standard Youtube License