|
Monomer |
Polymer |
Name examples of some polymers of this type |
|
Nucleic acid |
RNA ___________ |
|
|
Amino acids |
Enzymes _____________ |
|
|
Starch Cellulose |
In: Biology
Write a java program that will read a file called stateinfo.txt and will store the information of the file into a map. The stateinfo.txt file contains the names of some states and their capitals. The format of stateinfo.txt file is as follows.
State Capital
--------- -----------
NSW Sydney
VIC Melbourne
WA Perth
TAS Tasmania
QLD Brisbane
SA Adelaide
The program then prompts the user to enter the name of a state. Upon receiving the user input, the program should display the name of the capital for that particular state. Assume that the name of the state that a user may enter already exists in the stateinfo.txt file.
In: Computer Science
Create an application using PyQt. The user must be prompted for
the name of a country
(e.g. Spain) and a single character (e.g ‘a’). The application must
read the name of the
country and count the number of occurrences of the character in the
country name. The
count should be case-insensitive. Thus, if ‘c’ is entered as the
character then both capital
letter ‘C’ and small letter ‘c’ in the string should be counted.
The count must be displayed.
The application interface must include at least a label, an edit
and a button. You are
welcome to enhance your application with comments and messages.
In: Computer Science
In: Biology
The local taqueria wants you to write a program which tracks the number of burritos they sell each day and help them analyze their business.
Your C++ program should ask the user for the number of different burrito types sold, then get the names of the types and the number of burritos sold of each type of that day. Print out a daily report listing sales for each burrito type and total number of all burritos sold.
So far, this sounds very similar to a previous exercise! This difference this time is that you must use a struct called SalesRecord which has two fields -- a string containing the name of the burrito, and an int containing the number of burritos sold of this type. You must have one dynamically allocated array of SalesRecord structs.
SAMPLE OUTPUT:
Enter the number of different types sold: 4
Enter the name of the burrito 1: chicken
Enter the number of burritos sold of this type: 4
Enter the name of the burrito 2: pork
Enter the number of burritos sold of this type: 3
Enter the name of the burrito 3: shrimp
Enter the number of burritos sold of this type: 7
Enter the name of the burrito 4: california
Enter the number of burritos sold of this type: 9
Burrito Name Burrito Count
------------------------------------------
chicken 4
pork 3
shrimp 7
california 9
The total number of burritos sold for 4 types: 23
In: Computer Science
Write the class MultiDimList according to the following requirements:
The List will have the following:
Implement and test the following methods:
Input File:
Number of students
Name, ID, Mark separated by space
Testing:
Marking Scheme:
5 Marks/method.
5 Marks for the main method.
5 Marks creativity.
Total out of 40.
In: Advanced Math
Write a program called whilebun.py, in which the user is asked to guess the name of your favorite DBVac vacuum cleaner model. Your program should:
· Include a comment in the first line with your name.
· Include comments describing each major section of code.
· Set a variable called vacname to be equal to the name of your favorite DBVac vacuum cleaner model.
· Ask the user to guess the name. Allow the user to make up to three guesses, evaluating each guess for correctness immediately after the guess is made.
o The user’s guess shouldn’t be required to be case sensitive to be correct. For instance, if your favorite model is the Hare Razer, but the user inputs “HARE RAZER”, then that should be counted correct (as should “hare razer”, “hArE rAzEr” and any other combination of capital and lower-case letters).
o If the user guesses wrong, let them know, tell them how many guesses they have left, and have them guess again (up to three guesses total).
· If the user guesses the correct name:
o Stop asking the user to guess (even if they have not yet guessed three times).
o Congratulate the user on their guessing skills.
o Tell the user how many guesses it took them to guess correctly.
· If the user runs out of guesses without guessing the correct name:
o Console the user by telling them that, while they have failed in this task, it’s going to be okay.
In: Computer Science
Debug the pet.h file and pet.cpp file (I would like to check my work)
#ifnotdef PET_H
#then_define PET_H
#include <string>
using name space std
namespace fhsuzeng
{
Class Pet
{
public
Pet();
void setName(string name);
string getName() const;
void setAge(double age);
int getAge() const;
virtual void talk();
private:
string _name; int _age;
};
class Dog::public Pet
{
public:
Dog();
void setBreed(string breed);
string getBreed() const;
private: string _breed;
}
class Cat:Pet
{
Public:
Cat();
void setColor(string color);
string getColor() const;
private:
string _color;
};
}; #endif
The above is pet.h file and the following is the file pet.cpp
#include <string>
#include <pet.h>
using name space std
namespace fhsuzeng
{
void Pet::Pet():: _name("no name yet"), _age(0){}
int Pet::getAge() const { return age; }
void Pet::setAge(int age) { age = age; }
string Pet::getName() const { return _name }
void Pet::setName(string name) { _name = name; }
Pet::Dog(): Pet(), _breed("Any breed") {}
string Dog::getBreed() { return _breed; }
void Dog::setBreed(string breed) { _breed = breed; }
Cat::Cat(): Pet(), _color("Red")
Cat::string getColor() const { return _color; }
void Cat:: setColor(string color) { _color = color; } }
In: Computer Science
Draw a relational model for the following case
study.
Case Study
The local under-sixteen football league needs a database to help
track teams, children
that sign up to play in the league, the parents of these children
and the coaches for each
team.
The league wishes to record the details for each parent of a
particular player (the parents
last name, first name, phone contact number and address). For each
player, the system
needs to record the player's last name, first name, blood type and
their date of birth. Any
allergies that the player has also need to be recorded.
A player may only play in one team with this league. Each team is
given a unique id, the
system needs to record this id, the teams name, and the city their
home ground is located
(a city may have several under-sixteen teams based in it). A team’s
colours are also to be
recorded, teams may choose to use a single or multiple team
colours. A team may have
several coaches – one of the coaches is designated as the head
coach.
A coach is only permitted to coach one team in the under-sixteen
leagues. All
communications from the league to the team are via the head coach.
To be registered to
play in this league a team must have a head coach and at least one
player. The database
needs to track a coach's first and last name, phone and address
contact details and the
team that they are coaching.
In: Computer Science
HW_6d - Write a struct object to a binary file.
binary file named: critters.bin
each cat.
Record written to file. (see output)
/* OUTPUT
Enter 3 cat records.
Enter information about a cat:
NAME: Tom
AGE: 5
Enter information about a cat:
NAME: Fluffy
AGE: 3
Enter information about a cat:
NAME: Sweet Pea
AGE: 2
Record written to file.
Press any key to continue . . . */
Please make the code based on C++, and make a description for each code.
In: Computer Science