Java Programming
8th Edition
ISBN: 9781305981829
Author: Joyce Farrell
Publisher: Cengage Limited
expand_more
expand_more
format_list_bulleted
Question
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.
- Define the method “main()”,
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.
- Define the method “main()”,
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Pllleasassseee ssiiirrrr soolveee thissssss questionnnnnnn
Pllleasassseee ssiiirrrr soolveee thissssss questionnnnnnn
Pllleasassseee ssiiirrrr soolveee thissssss questionnnnnnn
Chapter 13 Solutions
Java Programming
Knowledge Booster
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
- Pllleasassseee ssiiirrrr soolveee thissssss questionnnnnnnarrow_forward4. def modify_data(x, my_list): X = X + 1 my_list.append(x) print(f"Inside the function: x = {x}, my_list = {my_list}") num = 5 numbers = [1, 2, 3] modify_data(num, numbers) print(f"Outside the function: num = {num}, my_list = {numbers}") Classe Classe that lin Thus, A pro is ref inter Ever dict The The output: Inside the function:? Outside the function:?arrow_forwardpython Tasks 5 • Task 1: Building a Library Management system. Write a Book class and a function to filter books by publication year. • Task 2: Create a Person class with name and age attributes, and calculate the average age of a list of people Task 3: Building a Movie Collection system. Each movie has a title, a genre, and a rating. Write a function to filter movies based on a minimum rating. ⚫ Task 4: Find Young Animals. Create an Animal class with name, species, and age attributes, and track the animals' ages to know which ones are still young. • Task 5(homework): In a store's inventory system, you want to apply discounts to products and filter those with prices above a specified amount. 27/04/1446arrow_forward
- Of the five primary components of an information system (hardware, software, data, people, process), which do you think is the most important to the success of a business organization? Part A - Define each primary component of the information system. Part B - Include your perspective on why your selection is most important. Part C - Provide an example from your personal experience to support your answer.arrow_forwardManagement Information Systemsarrow_forwardQ2/find the transfer function C/R for the system shown in the figure Re དarrow_forward
- Please original work select a topic related to architectures or infrastructures (Data Lakehouse Architecture). Discussing how you would implement your chosen topic in a data warehouse project Please cite in text references and add weblinksarrow_forwardPlease original work What topic would be related to architectures or infrastructures. How you would implement your chosen topic in a data warehouse project. Please cite in text references and add weblinksarrow_forwardWhat is cloud computing and why do we use it? Give one of your friends with your answer.arrow_forward
- What are triggers and how do you invoke them on demand? Give one reference with your answer.arrow_forwardDiscuss with appropriate examples the types of relationships in a database. Give one reference with your answer.arrow_forwardDetermine the velocity error constant (k,) for the system shown. + R(s)- K G(s) where: K=1.6 A(s+B) G(s) = as²+bs C(s) where: A 14, B =3, a =6. and b =10arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
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