Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

copying from the Internet. You may use your notes, book and the Internet to look up information. Students may occasionally be interviewed to demonstrate their

image text in transcribed
copying from the Internet. You may use your notes, book and the Internet to look up information. Students may occasionally be interviewed to demonstrate their knowledge of the code they have written. Create your lab using the name lab# firstname lastname, substituting the lab number in for # Objectives Declare the instance data in the class Write the constructor for the class Write method(s) for the class Write toString() method for the class - Add a new class file to your project - Create an object from the class n your driver (main) -Call the Class methods with and without parameters Grades -Demonstrate how to use DecimalFormat class for a double examt -double exam2 formatting output Instructions + Grades ovoid setexam1 (double ex) O +void setExam2(double ex) Write a program that does the following: 1) Create a class caled Grades String toString0 a) Define the following private Instance Data for the dass i) double exam1 i) double exam2 b) Create a Constructor that initializes exam1 and exam2 to 0.0 c) Write the setexam1 and setExam2 methods to modify the values exam1 and exam2 d) Write the toString method as described in class and on slide 34 of chapter 4 slides. i) Format exani and exam2 for 1 significant dig/t In main method a) Create an instance of the Grades class b) Call the set methods for exam1 and exam2 c) call the toString method to output the instance variables 2) 3) Example Output Exam1: 88.0 Exam2: 95.0 1/31/2019 Page 1 of 1 CSI 2300, Dinsmoor

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions