theendermanhaters

theendermanhaters

Lv1

Gary Johnson

0 Followers
0 Following
0 Helped

ANSWERS

Published6

Subjects

Architecture1English2Algebra1Computer Science2

import java.util.Scanner;

 

public class BankAccount {   protected double balance;   private int numOfDeposits;   protected int numOfWithdrawals;   private double annualInterestRate;

 

  public BankAccount(double balance, double annualInterestRate) {     this.balance = balance;     this.annualInterestRate = annualInterestRate;   }

 

  public void deposit(double amount) {     balance += amount;     numOfDeposits++;   }

 

  public void withdraw(double amount) {     balance -= amount;     numOfWithdrawals++;   }

 

  public void calcInterest() {     double monthlyInterestRate = (annualInterestRate / 12);     double monthlyInterest = balance * monthlyInterestRate;     balance += monthlyInterest;   }

 

  public void monthlyProcess() {     balance -= (numOfWithdrawals + numOfDeposits);     calcInterest();     numOfWithdrawals = 0;     numOfDeposits = 0;   } }

 

class SavingsAccount extends BankAccount {   private boolean status;

 

  public SavingsAccount(double balance, double annualInterestRate) {     super(balance, annualInterestRate);     status = balance >= 25;   }

 

  public void withdraw(double amount) {     if (!status) {       System.out.println("The savings account is inactive");       return;     }     super.withdraw(amount);     status = balance >= 25;   }

 

  public void deposit(double amount) {     super.deposit(amount);     status = balance >= 25;   }

 

  public void monthlyProcess() {     int withdrawalsOverLimit = numOfWithdrawals - 4;     if (withdrawalsOverLimit > 0) {       balance -= (1 * withdrawalsOverLimit);     }     super.monthlyProcess();     status = balance >= 25;   }

 

  public boolean getStatus() {     return status;   }

 

public Object getBalance() {     return null; }

 

public String getNumDeposits() {     return null; }

 

public String getNumWithdrawals() {     return null; }

 

public Object getServiceCharge() {     return null; }

 

public boolean isActive() {     return false; } }

 

class Test {     private static SavingsAccount account;

 

    public static void main(String[] args) {         Scanner sc = new Scanner(System.in);         double balance, interestRate, monthlyInterest;         int numDeposits = 0, numWithdrawals = 0, serviceCharge = 0;         System.out.print("Please enter your Account Balance: ");         balance = sc.nextDouble();         System.out.print("Please enter the Annual Interest Rate for the account: ");         interestRate = sc.nextDouble();         monthlyInterest = balance * interestRate / 12.0 / 100.0;         balance = balance + monthlyInterest;         System.out.println("The balance after adding the Monthly Interest: " + balance);         System.out.print("Please enter the amount you want to withdraw: ");         double withdraw = sc.nextDouble();         balance = balance - withdraw;         numWithdrawals += 1;         System.out.println("Balance after withdrawal: " + balance);         System.out.print("Do you want to make any more withdrawals? If yes please enter 1 and if no please enter 0: ");         int moreWithdrawals = sc.nextInt();         while (moreWithdrawals == 1) {            System.out.print("Please enter the amount you want to withdraw: ");            withdraw = sc.nextDouble();            balance = balance - withdraw;            numWithdrawals += 1;            System.out.println("Balance after withdrawal: " + balance);            System.out.print("Do you want to make any more withdrawals? If yes please enter 1 and if no please enter 0: ");            moreWithdrawals = sc.nextInt();         }         System.out.print("Please enter the amount you want to deposit: ");         double deposit = sc.nextDouble();         balance = balance + deposit;         numDeposits += 1;         System.out.println("Balance after depositing: " + balance);         System.out.print("Do you want to make any more deposits? If yes please enter 1 and if no please enter 0: ");         int moreDeposits = sc.nextInt();         while (moreDeposits == 1) {            System.out.print("Please enter the amount you want to deposit: ");            deposit = sc.nextDouble();            balance = balance + deposit;            numDeposits += 1;            System.out.println("Balance after depositing: " + balance);            System.out.print("Do you want to make any more deposits? If yes please enter 1 and if no please enter 0: ");            moreDeposits = sc.nextInt();         }         System.out.println("The total number of deposits made: " + numDeposits);         System.out.println("The total number of withdrawals made: " + numWithdrawals);

 

System.out.printf("The total service charge of the month is %.2f\n", account.getServiceCharge()); if (balance >= 0) {     System.out.println("The savings account is currently active");     } else {     System.out.println("The savings account is currently inactive"); System.out.println("The savings account is currently " + (account.isActive() ? "active" : "inactive"));     } } }   document every line in this code ( dont change anything in it ) header comment also included .

Answer: 2 / 2 This is a Java code for a banking system which includes classes ...

Using the latest flutter version under Android Studio. 

Main dart page got numerous errors - See below link

The first one -

import 'package:flutter/material.dart';
URL doesn't exist not sure why because it used to work before. TextStyle(fontWeight: FontWeight.bold, fontSize: 13, color: Colors.black);
TextStyle not define (huh)? Was working before as well.
The rest of the required create class.
Are you guys able to resolve these error messages?

The entire code (Which contained several pages)listed below in url

 

 

import 'dart:core';
import 'package:flutter/material.dart';
import 'package:final_project1/second.dart';
//test
void main() {
runApp(const App());
}

const text =
TextStyle(fontWeight: FontWeight.bold, fontSize: 13, color: Colors.black);
//for passing image to second screen

Image pic1 = Image.asset('images/burger.jpg');
Image pic2 = Image.asset('images/chicken.jpg');
Image pic3 = Image.asset('images/fries.jpg');

class App extends StatelessWidget {
const App({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.dark(),
debugShowCheckedModeBanner: false,
home: const MyApp(),
);
}
}

// ignore: non_constant_identifier_names
double? SmallPrize, MediumPrize, LargePrize;

// ignore: constant_identifier_names
enum OS { Burger, Chicken_Sandwich, French_Fries }

List<String> list = ['Burger', 'Chicken Sandwich', 'French Fries'];

OS? _os;
String? name;
Image pic = Image.asset('images/burger.jpg');
double? sb, mb, lb, ss, ms, ls, sf, mf, lf;
bool button = true;

class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);

@override
State<MyApp> createState() => _MyAppState();
}

String b = 'burger';
String c = 'Chicken Sandwich';
String f = 'French fries';

class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
toolbarHeight: 100,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
title: const Text(
'Menu',
style: TextStyle(
fontWeight: FontWeight.bold, fontSize: 30, color: Colors.black),
),
centerTitle: true,
backgroundColor: Colors.deepOrange,
),
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Expanded(
child: SizedBox(
width: 300,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
height: 100, width: 100, child: ClipOval(child: pic2)),
const SizedBox(width: 20),
Expanded(
child: SizedBox(
child: RadioListTile<OS>(
dense: true,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: const BorderSide(
color: Colors.black, width: 3)),
contentPadding: const EdgeInsets.all(0),
tileColor: Colors.deepOrange,
title: Text(
list.elementAt(1),
style: text,
),
value: OS.Chicken_Sandwich,
groupValue: _os,
onChanged: (val) {
setState(() {
SmallPrize = 5.00;
MediumPrize = 7.00;
LargePrize = 9.00;
name = list.elementAt(1);
pic = pic2;
_os = val;
});
},
),
),
),
],
),
),
),
Expanded(
flex: 1,
child: SizedBox(
width: 300,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
height: 100, width: 100, child: ClipOval(child: pic1)),
const SizedBox(width: 20),
Expanded(
child: RadioListTile<OS>(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side:
const BorderSide(color: Colors.black, width: 3)),
contentPadding: const EdgeInsets.all(0),
title: Text(
list.first,
style: text,
),
value: OS.Burger,
groupValue: _os,
tileColor: Colors.deepOrange,
onChanged: (val) {
setState(() {
SmallPrize = 5.00;
MediumPrize = 7.00;
LargePrize = 9.00;
name = list.first;
pic = pic1;
_os = val;
});
},
),
),
],
),
),
),
Expanded(
child: SizedBox(
width: 300,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
height: 100, width: 100, child: ClipOval(child: pic3)),
const SizedBox(width: 20),
Expanded(
child: SizedBox(
width: 400,
child: RadioListTile<OS>(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: const BorderSide(
color: Colors.black, width: 3)),
contentPadding: const EdgeInsets.all(0),
tileColor: Colors.deepOrange,
title: Text(
list.last,
style: text,
),
value: OS.French_Fries,
groupValue: _os,
onChanged: (val) {
setState(() {
SmallPrize = 2.50;
MediumPrize = 3.50;
LargePrize = 5.00;
name = list.last;
pic = pic3;
_os = val;
});
},
),
),
),
],
),
),
),
GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Second(
name_item: name.toString(),
pic: pic,
SmallPrize: SmallPrize,
MediumPrize: MediumPrize,
LargePrize: LargePrize,
),
),
);
},
child: Container(
width: double.infinity,
height: 100,
color: Colors.deepOrange,
child: const Center(
child: Text(
'Proceed',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20,
color: Colors.black),
),
),
),
),
],
),
);
}
}

Answer: It looks like you are missing the declaration of TextStyle and also th...
Answer: A famous mathematician is John Nash, who was born on June 13, 1928, in...

What effect does the number of lines in stanza 8 have on the poem?

From the text, "The Old Man Dreams"
 
1 For one hour of joyful youth!
2 Give back my twentieth spring!
3 I'd rather laugh a bright-haired boy,
 
4 Than reign a gray-beard king!
 
5 Off with the wrinkled spoils of age!
6 Away with learning's crown!
7 Tear out life's wisdom-written page,
 
8 And dash its trophies down!
 
9 One moment let my life-blood stream
10 From boyhood's fount of fame!
11 Give me one giddy, reeling dream
 
12 Of life, all love and flame!
 
13 My listening angel heard the prayer,
14 And, calmly smiling, said,
15 "If I but touch thv silvered hair.
 
16 Thy hasty wish hath sped."
 
17 "But is there nothing in thy track
18 To bid thee fondly stay,
19 While the swift seasons hurry back
 
20 To find the wished-for day?"
 
21 Ah, truest soul of womanhood!
22 Without thee what were life?
23 One bliss I cannot leave behind:
 
24 I'll take-my-precious-wife!
 
25 The angel took a sapphire pen
26 And wrote in rainbow dew,
27 The man would be a boy again,
28 And be a husband tool"
 
29 "And is there nothing yet unsaid,
30 Before the change appears?
31 Remember, all their gifts have fled
32 With those dissolving years!"
33 Why, yes; for memory would recall
34 My fond paternal joys;
35 I could not bear to leave them all:
 
36 III take -my-girl-and-boys!
 
37 The smiling angel dropped his pen-
38 "Why, this will never do;
39 The man would be a boy again,
 
40 And be a father too!
 
41 And so I laughed-my laughter woke
42 The household with its noise-
43 And wrote my dream when morning broke
44 To please the gray haired boys.
 
Answer:The number of lines in stanza 8 has an effect of emphasizing the speake...
Answer: Organic fertilizers have increased crop yields during the last 100 yea...

32

NARRATIVE OF THE

CHAPTER VII.

I LIVED in Master Hugh's family about seven years. During this time, I succeeded in learning to read and write. In accomplishing this, I was compelled to resort to various stratagems. I had no regular teacher. My mistress, who had kindly commenced to instruct me, had, in compliance with the advice and direction of her husband, not only ceased to instruct, but had set her face against my being instructed by any one else.

It is due, however, to my mistress to say of her, that she did not adopt this course of treatment immediately. She at first lacked the depravity indispensable to shutting me up in mental darkness. It was at least necessary for her to have some training in the exercise of irresponsible power, to make her equal to the task of treating me as though I were a brute.

My mistress was, as I have said, a kind and tender-hearted woman; and in the simplicity of her soul she commenced, when I first went to live with her, to treat me as she supposed one human being ought to treat another. In entering upon the duties of a slaveholder, she did not seem to perceive that I sustained to her the relation of a mere chattel, and that for her to treat me as a human being was not only wrong, but dangerously so. Slavery proved as injurious to her as it did to me. When I went there, she was a pious, warm, and tender-hearted woman. There was no sorrow or suffering for which she had not a tear. She had bread for the hungry, clothes for the naked, and comfort for every mourner that came within her reach. Slavery soon proved its ability to divest her of these heavenly qualities. Under its influence, the tender heart became stone, and the lamblike disposition gave way to one of tiger-like fierceness. The first step in her downward course was in her ceasing to instruct me.

 

 

3. How does Mrs. Auld change once she is exposed to the evil power of slavery? (Chapter VII)

4. How does Douglass describe Mrs. Auld's transformation due to the influence of becoming a slaveholder?

Answer: 3. Mrs. Auld, who was initially a kind and tender-hearted woman with a...

Weekly leaderboard

Start filling in the gaps now
Log in