Programming

Programming questions? Ask a programmer for answers ASAP

Ask a Computer Expert,
Get an Answer ASAP!

a) Obtain code from Deitel fig 2.7 or Gaddis p. 265 5-5 code…

Customer Question
a) Obtain code from Deitel...
a) Obtain code from Deitel fig 2.7 or Gaddis p. 265 5-5 code and compile with a JDK 1.6.0 service in the editor of your choice NetBeans, Textpad, or Ecllipse.
b) Edit the code to add four functions to the class for input, calcAverage, display, constructors , and remove the main to another class called main. Do only the average calculation for three variables.

c) Add a new file called Averagemain or Averagetester class that holds the main functions and calls the functions in the Average class. Have an object instance in main for the Average class that clls all the functions.
d) Leave the data members in the Average class as privates.
e) Add the set & get functions for each private data member.

f) Compile code , then execute.
g Hand in cover sheet, source code from editor, IPO chart, and the screen captures of executed code in DOS window (pasted in Word and printed from Word).
Submitted: 8 years ago.Category: Programming
Show More
Show Less
Ask Your Own Programming Question
Answered in 7 hours by:
6/15/2010
Programmer: LogicPro, Computer Software Engineer replied 8 years ago
LogicPro
LogicPro, Computer Software Engineer
Category: Programming
Satisfied Customers: 13,508
Experience: Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.
Verified
Hi,
Welcome to JustAnswer.
I will need the code from Deitel fig 2.7 or Gaddis p. 265 5-5 as your question states " Obtain code from Deitel fig 2.7 or Gaddis p. 265 5-5 code"
upload the source code file(s) to http://wikisend.com and post download link here.
Ask Your Own Programming Question
Customer reply replied 8 years ago

here is the code (TestAverage1.java)

import java.util.Scanner;

this program demonstrate a user controlled loop

 

public class TestAverage1

{

public static void main (String [] args

{

 

Programmer: LogicPro, Computer Software Engineer replied 8 years ago
Your post got turncated. Please repost.

Edited by LogicPro on 6/16/2010 at 3:08 PM EST
Ask Your Own Programming Question
Customer reply replied 8 years ago

here is the code (TestAverage1.java)

import java.util.Scanner;

this program demonstrate a user controlled loop

 

public class TestAverage1

{

public static void main (String [] args

{

Programmer: LogicPro, Computer Software Engineer replied 8 years ago
It again got turncated.
Upload the source code file to http://wikisend.com and post download link here.
Or
paste the code at pastebin.com and post the URL here.

Ask Your Own Programming Question
Customer reply replied 8 years ago

ok i will try to paste the link for u again

Programmer: LogicPro, Computer Software Engineer replied 8 years ago
Thank you
Ask Your Own Programming Question
Customer reply replied 8 years ago
Code:
import java.util.Scanner; public class GradeBookRx { //declare variables // a string array to hold the 5 students names private String[] names = new String[5]; // an array of 5 characters to hold the 5 students letter grades private char[] grades = new char[5]; // 5 arrays of four doubles each to hold each students test scores private double[] scores1 = new double[4]; private double[] scores2 = new double[4]; private double[] scores3 = new double[4]; private double[] scores4 = new double[4]; private double[] scores5 = new double[4]; int count = 0; Scanner keyboard = new Scanner(System.in); public void enterData() { System.out.println("Enter student's name:"); String student = keyboard.nextLine(); System.out.println("Now enter student's first test score"); double score1 = Double.parseDouble(keyboard.nextLine()); System.out.println("Now enter student's second test score"); double score2 = Double.parseDouble(keyboard.nextLine()); System.out.println("Now enter student's third test score"); double score3 = Double.parseDouble(keyboard.nextLine()); System.out.println("Now enter student's fourth test score"); double score4 = Double.parseDouble(keyboard.nextLine()); addStudent(student, score1, score2, score3, score4); } public String toString() { StringBuilder sb = new StringBuilder(); for(int i = 0; i < names.length; i++) { if(names == null) continue; sb.append("Name: " + names + "\t" + "Average score: " + getAverage(i) + "\t" + "Grade: " + grades + "\n"); } return sb.toString(); } private void addStudent(String inName, double scr1, double scr2, double scr3, double scr4) { // If arrays are full, start over at beginning. if(count == names.length-1) count = 0; names[count] = inName; scores1[count] = scr1; scores2[count] = scr2; scores3[count] = scr3; scores4[count] = scr4; grades[count] = getGrade(count); count++; } private double getAverage(int index) { double score1 = scores1[index]; double score2 = scores2[index]; double score3 = scores3[index]; double score4 = scores4[index]; double average = (score1 + score2 + score3 + score4)/4.0; return average; } private char getGrade(int index) { double average = getAverage(index); char grade; if(average>=90) grade='A'; else if(average >=80) grade='B'; else if(average>=70) grade='C'; else if(average>=60) grade='D'; else // average<60 grade='F'; return grade; } public static void main(String[] argsd) { GradeBookRx test = new GradeBookRx(); test.enterData(); System.out.println("gradebook = " + test); } }
Programmer: LogicPro, Computer Software Engineer replied 8 years ago
Hi,
I am not able to read the code. Formatting is messed up.

Upload the source code file(java file) to http://wikisend.com and post download link here.
Or
paste the code at http://pastebin.com and post the URL here.
Ask Your Own Programming Question
Was this answer helpful?

How JustAnswer works

step-image
Describe your issueThe assistant will guide you
step-image
Chat 1:1 with a programmerLicensed Experts are available 24/7
step-image
100% satisfaction guaranteeGet all the answers you need
Ask ATLPROG Your Own Question
ATLPROG
ATLPROG
ATLPROG, Computer Software Engineer
Category: Programming
Satisfied Customers: 7,677
7,677 Satisfied Customers
Experience: MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

ATLPROG is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

One Happy CustomerNew York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

< Previous | Next >

Meet the Experts:

ATLPROG

ATLPROG

Computer Software Engineer

7,677 satisfied customers

MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

LogicPro

LogicPro

Computer Software Engineer

13,508 satisfied customers

Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

unvadim

unvadim

Computer Software Engineer

1,168 satisfied customers

Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

lifesaver

lifesaver

Computer Software Engineer

950 satisfied customers

Several years of intensive programming and application development experience in various platforms.

ehabtutor

ehabtutor

Computer Software Engineer

936 satisfied customers

Bachelor of computer science, 5+ years experience in software development, software company owner

TheDoctor

TheDoctor

Software Engineer

893 satisfied customers

M.S. in Internet Information Systems

The-PC-Guy

The-PC-Guy

Software Engineer

848 satisfied customers

Extensive Knowledge in PHP, MYSQL, CSS & Javascript

< Previous | Next >

Related Programming Questions
hat does the super keyword represents and where can it be
hat does the super keyword represents and where can it be used? Give an example of a superclass and subclass. Be sure to make all the instances variables of the super class private. Include at least o… read more
Jerubedo
Jerubedo
Software Engineer
Bachelor\u0027s Degree
7 satisfied customers
1. (TCO 9) What type of menu displays a choice and then immediately th
1. (TCO 9) What type of menu displays a choice and then immediately the action? (Points : 3) Single-level menu Multiple-level menu Step-level menu Sublevel menu 2. (TCO 9) The items displayed in a men… read more
ehabtutor
ehabtutor
Computer Software Engineer
Bachelor's Degree
936 satisfied customers
1. (TCO 9) Menu-driven programs should be broken down into
1. (TCO 9) Menu-driven programs should be broken down into _____ that perform individual tasks. (Points : 3) loops functions tasks modules 2. (TCO 9) What is the method used to make sure that valid se… read more
ATLPROG
ATLPROG
Computer Software Engineer
Master's Degree
7,677 satisfied customers
I need to take a test that will have multiple short programs
I need to take a test that will have multiple short programs that I need in a pretty timely manner. I would only need the source code in a notepad or word document and I need to take this test today. … read more
Raj
Raj
SAP ABAP Consultant
Master\u0027s Degree
27 satisfied customers
L A O V E R V I E W Summary In this lab, you will apply the
L A B O V E R V I E W Summary In this lab, you will apply the knowledge you have gained this week by illustrating solutions to a programming problem using Visual Studio and C++. Use your textbook and … read more
Raj
Raj
SAP ABAP Consultant
Master\u0027s Degree
27 satisfied customers
I help defining key terms in programing: Inheritance,Polymorphism,
I help defining key terms in programing: Inheritance,Polymorphism, Overriding, Overloading, Loose Coupling, Java Interface, UML class diagram? Please define in your own words.… read more
Aitizaz
Aitizaz
Software Engineer
Bachelor\u0027s Degree
163 satisfied customers
I need just a working pseudocode that satisfies the following
I need just a working pseudocode that satisfies the following requirements: Provide a simple, working code that includes a base class, a child class (inheritance), a composite object within either cla… read more
jatechexpert
jatechexpert
Master\u0027s Degree
1 satisfied customers
FULL ASSIGNMENT http //www.mediafire.com/ rynfwat55s4qrwt Lab
FULL ASSIGNMENT: http://www.mediafire.com/?rynfwat55s4qrwt Lab Overview Using the Time class that implements the time of day in a program that we have been discussing, extend the class to include a th… read more
jatechexpert
jatechexpert
Master\u0027s Degree
1 satisfied customers
for altProg 1. (TCO 9) What type of menu first displays the
"for altProg" 1. (TCO 9) What type of menu first displays the main menu and then, based on the user's selection, displays a submenu? (Points : 3) Single-level menu Multiple-level menu Step-level menu … read more
ATLPROG
ATLPROG
Computer Software Engineer
Master's Degree
7,677 satisfied customers
Exercise 1 Resistor Class Constructors (20 points) Back
Exercise 1: Resistor Class Constructors (20 points) Back to top Objective: Create a C++ console application that utilizes the core concepts of designing and creating classes, objects, properties and m… read more
Raj
Raj
SAP ABAP Consultant
Master\u0027s Degree
27 satisfied customers
Hi, I need help again I believe you are familiar with this
Hi, I need help again I believe you are familiar with this assignment. I am going to post all information below. Thanks… read more
jatechexpert
jatechexpert
Master\u0027s Degree
1 satisfied customers
/** * BankAccount class * This class simulates a bank account.
/** * BankAccount class * This class simulates a bank account. * * (Taken from "Starting Out with Java - Early Objects * (Third Edition) by Tony Gaddis, 2008 by Pearson Educ.) * */ public class BankAc… read more
Raj
Raj
SAP ABAP Consultant
Master\u0027s Degree
27 satisfied customers
Objective Create a derived class named FancyDateClass by inheriting
Objective: Create a derived class named FancyDateClass by inheriting the DateClass. You will have to provide both the class definition and implementation. Create a new Visual Studio project and source… read more
LogicPro
LogicPro
Computer Software Engineer
13,508 satisfied customers
Implement a class called Employee. An employee has a name and
Implement a class called Employee. An employee has a name and gets a salary. Every pay period each employee gets an additional amount in bonus. Include a constructor that accepts the name and salary o… read more
Raj
Raj
SAP ABAP Consultant
Master\u0027s Degree
27 satisfied customers
#1) Write a C++ class called RationalNumber. Provide both the
I have 6 questions that need to be answers that involves programming and example of answers. I will resubmit them when I here from you. I do give a bonus.… read more
DLUF00
DLUF00
Master's Degree
12 satisfied customers
Coder4Life, hello from Arizona to Texas.I was skimming
Coder4Life, hello from Arizona to Texas. I was skimming through examples of source code using class and functions and came across a question that someone had asked of you approx 45 days ago. It sounds… read more
Nilesh
Nilesh
Bachelor\u0027s Degree
649 satisfied customers
Create an Account class that a bank might use to represent
Create an Account class that a bank might use to represent customers' bank accounts. Include a data member of type int to represent the account balance. Provide a constructor that receives an initial … read more
Raj
Raj
SAP ABAP Consultant
Master\u0027s Degree
27 satisfied customers
//This program was created and editted by Jason Rushing on
//This program was created and editted by Jason Rushing on 11/12/08 #include #include using std::cin; using std::cout; using std::endl; //function prototype double getTestScore (double); double calcAv… read more
Hirash Riyal
Hirash Riyal
Higher Diploma In IT
174 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x