Jonathan Scholl
CIS242
Week 10 Homework 5
a) How many members does class bagType have?
12 members.
b) How many private members does class bagType have?
5 private members.
c) How many constructors does class bagType have?
2 constructors.
d) How many consta

/-
/ During each summer, John and Jessica grow vegetables in their backyard and buy seeds
/ and fertilizer from a local nursery. The nursery carries different types of vegetable
/ fertilizers in various bag sizes. When buying a particular fertilizer, th

/-
/ You found an exciting summer job for five weeks. It pays, say, $15.50 per hour.
/ Suppose that the total tax you pay on your summer job income is 14%.
/ After paying the taxes, you spend 10% of your net income to buy new clothes
/ and other access

/-
/ Chapter 2 Exercise 18
/ A milk carton can hold 3.78 liters of milk.
/Each morning, a dairy farm ships cartons of milk to a local grocery store.
/The cost of producing one liter of milk is $0.38, and the profit of each carton of milk is $0.27.
/Wri

Jonathan Scholl
CIS242
Week 1 Homework 2
An ATM allows a customer to withdraw a maximum of $500 per day. If a customer
withdraws more than $300, the service charge is 4% of the amount over $300. If the
customer does not have sufficient money in the accoun

Jonathan Scholl
CIS242
Week 1 Homework 1
1) Declare variables
int numOfItems;
double itemCost;
double totalCost = 0;
double finalAmout;
2) Get numOfItems. Formula:
Prompt user to input the number of items. Store input in numOfItems
If (user input is less

Question 1
4
out of 4 points
The basic commands that
a computer performs are
_, and performance of
arithmetic and logical
operations.
Selected Answer:
input, output, storage
Correct Answer:
input, output, storage
Question 2
4 out of 4 points
Consider the