SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 314 Weeks Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 28 Nov 2017 My Price 10.00

programming solution is pretty similar with the things

HI, Adi10198

Can you also help me with these problems, your programming solution is pretty similar with the things we studied in class and pretty useful.

please and thank you.

cha 5

6. Fuel Economy A fuel-economy study was carried out for five models of cars. Each

car was driven 100 miles, and then the model of the car and the number of gallons

used were placed in a line of the file Mileage.txt. Table 5.11 shows the data for the

entries of the file. Write a program to display the models and their average miles per

gallon in decreasing order with respect to mileage. See Fig. 5.51. The program should

create a dictionary of five items, with a key for each model, and a two-tuple for each

value. Each two-tuple should be of the form (number of test vehicles for the model, total

number of gallons used by the model).

Screen Shot 2017-06-08 at 12.20.47 AM.png

 

7. U.S. Cities The file Cities.txt contains information about the 25 largest cities in

the United States. Each line of the file has four fields—name,state,population in 2000

(in 100,000s), and population in 2010 (in 100,000s). Write a program that creates a new

file with each line containing the name of a city and its percentage population growth

from 2000 to 2010. The cities should be in decreasing order by their percent population

growth. The first four lines of the file Cities.txt are as follows:

New York,NY,80.1,82.7

Los Angeles,CA,36.9,38.84

Chicago,IL,29.0,28.7

Houston,TX,19.5,22.4

 

cha 6

1. Guess My Number Write a robust program that randomly selects a number from

1 through 100 and asks the user to guess the number. At each guess the user should

be told if the guess is proper, and if so, whether it is too high or too low. The user

should be told of the number of guesses when finally guessing the correct number.

See Fig. 6.28.

Screen Shot 2017-06-08 at 12.22.19 AM.png

2. Analyze a Poker Hand Write a program using the file DeckOfCardsList.dat that

randomly selects and displays five cards from the deck of cards and determines which

of the following seven categories describes the hand: four-of-a-kind,full house (three cards of one rank, two cards of another rank), three-of-a-kind,two pairs, one pair, or ranks-all-different. See Fig. 6.29. (Hint: Determine the number of different ranks in the hand and analyze each of the four possible cases.)Screen Shot 2017-06-08 at 12.22.49 AM.png

 

cha 7

 

2. Savings Account Write a program to maintain a savings account. The program

should use a class named SavingsAccount with instance variables for the customer's

name and the account balance, and two methods named makeDeposit and makeWithdrawal.

The makeWithdrawal method should deny withdrawals that exceed the balance in the account. See Fig. 7.22.Screen Shot 2017-06-08 at 12.30.16 AM.png

 

3. Payroll Write a program that displays the weekly payroll for a company that hires

both salaried and hourly employees. The program should contain a class named

Employee having two subclasses named SalariedEmployee and HourlyEmployee. The

Employee

class should have instance variables for name, rate of pay, and hours worked.

(The rate of pay should be a fixed amount for salaried employees and the hourly wage

for hourly employees.) Each subclass should have a calculatePay method.

After the data for all of the employees has been entered, the program should display

the week's pay for each employee, the number of employees, the number of salaried

employees, the total payroll, and the average number of hours worked by the employees. See Fig. 7.23. The program should use a list of objects.Screen Shot 2017-06-08 at 12.31.01 AM.png

Attachments:

Answers

(5)
Status NEW Posted 28 Nov 2017 12:11 PM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)